axiom-zig
builder-hex0
axiom-zig | builder-hex0 | |
---|---|---|
3 | 6 | |
5 | 27 | |
- | - | |
1.8 | 7.6 | |
over 2 years ago | 3 months ago | |
Zig | C | |
- | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
axiom-zig
-
Zig, Rust, and Other Languages
Nim is also a strong player as a systems programming language. In terms of memory management, it's configurable, and by default you get ARC (no GC). I've written a hobby kernel (if you can call it that) in Nim[1] as well as Zig[2], and I found Nim to be much more ergonomic and approachable. The fact that Zig requires weaving an allocator through most calls that may allocate gets in the way of what I'm trying to do. I'd rather focus on core logic and have ref counting take care of dropping memory when appropriate.
One thing I wish Nim had though is true sum types with payloads. I think there's an RFC for that, but it's a shame it's not in the language yet.
[1] https://github.com/khaledh/axiom
[2] https://github.com/khaledh/axiom-zig
- Nim v2.0 Released
-
Writing a Simple Operating System – From Scratch [pdf]
If anyone is interested, I have a couple of implementations of booting under UEFI and getting a bunch of info about the system (don't expect a functioning system, they just boot and dump some info):
Nim: https://github.com/khaledh/axiom
Zig: https://github.com/khaledh/axiom-zig (this one goes into depth in disassembling ACPI DSDT bytecode)
builder-hex0
- Builder-Hex0 – bootstrap compilers without a prebuilt binary
-
NixOS Reproducible Builds: minimal ISO successfully independently rebuilt
Isn't that what builder-hex0 does?
https://github.com/ironmeld/builder-hex0
-
Saving Knowledge Post-Collapse
They literally create a file system and whole operating system in 4KB of text and it is good enough to bootstrap GCC/Linux ( https://github.com/ironmeld/builder-hex0 )
- Builder-Hex0: kernel for bootstrapping compilers without trusting a binary
- Major breakthrough in bitcoin Trust
-
Writing a Simple Operating System – From Scratch [pdf]
"It is true: in our quest to make full use of the CPU, we must abandon all of those helpful routines provided by BIOS. As we will see when we look in more detail at the 32-bit protected mode switch-over, BIOS routines, having been coded to work only in 16-bit real mode, are no longer valid in 32-bit protected mode; indeed, attempting to use them would likely crash the machine.
"So what this means is that a 32-bit operating system must provide its own drivers for all hardware of the machine (e.g. the keybaord, screen, disk drives, mouse, etc). Actually, it is possible for a 32-bit protected mode operating system to switch temporarily back into 16-bit mode whereupon it may utilise BIOS, but this teachnique can be more trouble than it is worth, especially in terms of performance."
--
In the toy 32-bit OS I am currently writing, having easy disk access and text output was more important to me than performance, so I decided to implement this technique to access the disk and screen via the BIOS instead of writing an ATA disk driver.
Although I could not find any minimal yet complete working examples of dropping to 16 bit and later resuming 32 bit mode, I was able to piece it together and write assembly functions called enter_16bit_real and resume_32bit_mode. See https://github.com/ironmeld/builder-hex0/blob/main/builder-h.... Those routines are working well but beware the project is a volatile work in progress and is coded in hex for bootstrapping reasons.
What are some alternatives?
axiom - A 64-bit kernel implemented in Nim
uefi-rs - Rust wrapper for UEFI.
linux - Linux kernel source tree
turning-polyglot-solutions-into-t
v - Write Nim only with 'v'
stage0-posix-x86
nimbus-eth2 - Nim implementation of the Ethereum Beacon Chain
turning-polyglot-solutions-into-trusted-images
jester - A sinatra-like web framework for Nim.
nixpkgs - Nix Packages collection & NixOS