Show HN: I made a set of tools to write kernel prototypes.

github.com

8 points by tlbflush 24 days ago

This is a personal project I've been working on and off for the past few years.

It's a set of tools that have allowed me to prototype quickly small (and increasingly bigger) kernels, and create userspace programs to interact with them.

Supports riscv64, amd64 and i386. The intel port has been tested and used on real hardware, from big dual-socket Xeon machines to an old X220.

It is all C, I have plan to make rust bindings for the kernel library. But again, they're plans at this stage.

Porting to new architectures is relatively simple, a basic port to riscv took me a couple of weeks of spare-time hacking.

While still at early stage, has now reached the point where I believe it can be useful to more people than just me.

Let me know what you think :-)

orbat 24 days ago

Huh, this is interesting. Great idea for a project. Is there much out there with similar aims? I absolutely don't know the field well enough to say.

I think this could really benefit from documentation, and maybe a sort of tutorial that walks you through the steps of building something with these. Even just commenting the various parts of the examples, "here we need to foo so we can flerb the qux", "to do xyz, we need to …" and so on.

"Investing" in code readability & comments might also be worthwhile. If I wanted to use nux to build something, I really wouldn't know where to start even with the examples, as the comments on the header files are pretty terse and reading the code itself is pretty daunting as there's quite a lot of it and with fairly few comments, and there's a lot of acronyms and short identifiers. This'd also make it easier for others to contribute too.

But having a toolkit for testing out ideas and prototypes without having to worry about all the more boilerplate-y parts of kernels seems very useful.

  • tlbflush 24 days ago

    Yes, that is indeed very true.

    There’s definitely a lot to say about the architecture, the design choice and how to use it.

    Thanks!