▲ | eikenberry 5 days ago | ||||||||||||||||
Their OS is written in Zig!
Thought it might be of interest to people learning Zig. I bet there are some interesting examples in there. | |||||||||||||||||
▲ | rollcat 5 days ago | parent | next [-] | ||||||||||||||||
The OS looks highly opinionated and I respect that. Better to have a single overarching vision than try to do too many things poorly. However I will question some design choices! - 32-bit only: the writing is on the wall, many vendors (HW&SW) are slowly moving to kill it off. I guess it's fine, but IMHO each ISA (regardless of pointer width) should just be considered a different ISA. Portability is good, it ensures your software doesn't hardcode too many assumptions about the platform - and weeds out bugs. Just treat an int like an int, and a pointer like a pointer. Distinct types. - Pure co-op multitasking: it will be completely fine, until you try serious in-system development. Hard reboot any time I make a mistake in a for-loop? Mercy, please :,) Implementing a simple watchdog via a timer interrupt will still keep all of the scheduling logic simple and stupid: it's just another case for a yield call, except now involuntary. The runaway process will simply never see completion, but seeing that it would never yield anyway, I don't see a problem just killing it. And most importantly, the sanity shall be preserved. | |||||||||||||||||
| |||||||||||||||||
▲ | anitil 5 days ago | parent | prev [-] | ||||||||||||||||
I've been following Andrew Kelley's writing and zig is probably next on the list for me (previously would have been rust). The story from C to Zig and the ease of cross compilation makes it really tempting. I haven't looked in to the comptime capabilities much but it looks like it could help with some of the embedded work I do |