What does HackerNews think of clashos?

multiplayer arcade game for bare metal Raspberry Pi 3 B+

Language: Zig

#19 in Raspberry Pi
You are correct that I also asked other online communities this question.

I wouldn't say I was trying to force a narrative. I was asking out of concern. I was especially unnerved after seeing the development graph on GitHub:

https://imgur.com/M09Nkx9

Also seeing there were features that haven't been implemented for the last 6 years made me even less confident about the future of the project:

https://github.com/ziglang/zig/issues/68

Even from this post:

https://andrewkelley.me/post/full-time-zig.html

Of all the Zig projects the author said he was going to work on:

- https://github.com/andrewrk/groovebasin/tree/zig

- https://github.com/andrewrk/genesis/tree/zig

- https://github.com/andrewrk/clashos

he never committed and did any of them.

Zig was started with that exact use case at the forefront of its design.

- Zig has no hard dependency on libc, it's the user's choice whether he wants to link it or not. It ships musl libc and can build/link it for most (all?) supported targets.

- Most of Zig's standard library works on freestanding targets. No runtime needed. There are no implicit allocators, so the user must use an allocator shipped with the standard library or implement their own.

- Standard library is still in its early days but already provides a lot of functionality out of the box, from containers to io.

- Using the standard library is optional. When it is used, only what is used gets included. The standard library is built from source every time (though there is caching) and its semantic analysis basically does LTO in the codegen stage so you end up with pretty slim binaries.

Here's a couple of examples:

- https://github.com/andrewrk/clashos

- https://github.com/AndreaOrru/zen

If you're starting a new operating system project, you might consider using Zig[1] instead of C.

It does all the low level stuff that C does but it has some safety features as well as generics.

The standard library is usable in freestanding mode, even the data structures that allocate memory, because everything takes an allocator as a parameter.

Here are some examples:

* i386 OS: https://github.com/AndreaOrru/zen

* ARM (raspberry pi) OS: https://github.com/andrewrk/clashos

[1]: http://ziglang.org/