3 ms·
> significantly reduce the amount of C code but I'm not sure you could eliminate it entirely Theseus is a research OS written in Rust that seems to include C p
by yencabulator 3y ago
> significantly reduce the amount of C code but I'm not sure you could eliminate it entirely
Theseus is a research OS written in Rust that seems to include C purely to show how to support programs written in C (libc and a demo app).
https://github.com/theseus-os/Theseus https://github.com/theseus-os/Theseus
It contains some 1000+ lines of ASM for the early boot from BIOS, that look like they originate from https://os.phil-opp.com/minimal-rust-kernel/ https://os.phil-opp.com/minimal-rust-kernel/ -- I think UEFI boot would have been doable in pure Rust (https://github.com/rust-osdev/uefi-rs https://github.com/rust-osdev/uefi-rs).
- kbolino 3y agoRust certainly provides much stronger guarantees than C, though some of its features aren't available (or at least don't come batteries included) in a freestanding (no_std) environment. The borrow checker is also a lot less forgiving than a garbage collector.