DEV Community

Ícaro
Ícaro

Posted on AI-assisted

What do you think of this kernel compilation method?

I’ve been exploring a new way to develop my programming language and evolve it gradually alongside my kernel project.

While working on NexisK and NexisLoader, I started thinking about the build process itself. Running make all is practical, but it is also generic. It works, but it does not really reflect the kind of system I want to build.

That led me to a different idea: what if I created a compiler within my open-source kernel that could read a user-created build.nexis file, parse its own build syntax, and then invoke the actual Makefile?

The idea is still in its early stages. I would need to define the syntax, design the parser, and determine how the compiler would interact with the build system. There are also several technical questions to solve, especially regarding how the kernel would handle file access, process execution, and communication with the build tools.

However, that is part of what makes the project interesting to me.

I do not want to create another language simply by adding a different syntax to existing instructions. I want to understand how the different components work together, from parsing source code to executing commands and managing the build process.

The build.nexis file could eventually become a way to describe how a project should be built, while the compiler would interpret that description and coordinate the necessary steps.

This is not about replacing Make because it is bad. Make already solves a real problem. My goal is to experiment with a different approach and use the project as an opportunity to deepen my understanding of compiler development, language design, and operating systems.

I am still defining what this language should become, but I think connecting it to my kernel could make the development process more interesting and give it a more specific purpose.

What do you think about this approach?

Top comments (0)