This implementation uses async/await, data structures from Rust's standard library (alloc crate), plus streams and channels (30 dependencies in total), so it's pretty fancy for a "no_std" project.
Bare-bones Rust executables can start at about 3.5KB, and code size increase on top of that is comparable to C or C++. Rust can be a "portable assembler" if you write code in such style. It can also generate lots of code if you lean into generics (same issue as with C++ templates).
So how does it work. Where do the standard library functions come from? Where do all the garbage collecting functionality gets loaded from?. Or is it more like pinvoking a reduced external library in C for all needed functionality.
1. Used CoreRT instead of the standard .NET libraries
2. He avoided using functionality that would use GC in the first place
3. Created his own alternative runtime library w/out GC and exception handling
4. Created a base type library for some of the System functions
5. Re-directed certain functions like Thread.Sleep to smaller implementations in specific libraries.
This is also a very good example that not all languages with GC are created equal, some do provide the mechanisms to do alternative ways of managing resources.
https://github.com/nongiach/snake_boot_sector
or:
https://github.com/w-shackleton/snake-in-my-boot