Live data from Hacker News

Minimal x86 Kernel Zig

github.com

11–20 of 71 posts

Re: Minimal x86 Kernel Zig

#15
post #12

What's the point of doing this in "Zig" instead of C, the traditional choice for this kind of thing?

Because you can is a pretty traditional reason.

Zig is supposed to be an improvement upon C, so doing C things with it seems reasonable.

Kind of neat that there's no need for a separate assembly file although there is inline assembly. Might get better (or worse) syntax support for separate assembly files? But it doesn't make a big difference until there's more features that need it (interrupts, threads/processes and maintaining their stacks, syscalls, starting other processors, etc)

Re: Minimal x86 Kernel Zig

#17
I'm very surprised it's *that* short - handling one in rust i'm surprised by the very low amount of code to get that up. Thanks or sharing that was a first time reading some Zig for me !

Re: Minimal x86 Kernel Zig

#20

thats not a kernel

Indeed, it's freestanding, the repo name doesn't have the correct term, but the source file does near the end: https://github.com/lopespm/zig-minimal-kernel-x86/blob/main/...

Also baremetal where the metal is virtual. LLVM uses this term for when an OS isn't available https://github.com/llvm/llvm-project/tree/main/libc/src/stdl...

Post reply on HN