back
2 comments
I have been reviewing stage0 and gave a presentation, 'reviewing live-bootstrap' about it at WHY2025, in which I also made some suggestions about improving stage0. I am now working on this.

What I refer to as stage0 is the first 19 steps of the mentioned description, which actually involves the execution of over 700 executables. (See presenration for T-diagran.) I believe that number can reduced by at least a half.

Please share me the youtube video regarding the presentation for bootstrapping as I find the idea of bootstrapping really pleasant and like I am most likely sure that although I am more an arch(cachy) personal user/debian for servers users. I feel like even these are adding reproducibility and I am sure that nixos can be reproducible https://news.ycombinator.com/item?id=38057591

Guix can definitely be bootstrapped but there are comments on this post where someone tries to reproduce nix with tcc etc.

Imagining the ability that nix can be completely bootstrapped makes me feel like it can be really good for these purposes

Like if this is reproducible and bootstrappble, then I am satisfied with the hash because other people can test it out to verify they get the same hash and I can download the iso's and then verify the hash myself to find complete safety.

Although I might still be trusting my linux iso but maybe we will have risc-v hardware where I can plug in an sd card or data or similar and it can give the hash of it for the extremely paranoid (maybe universities or very secure companies perhaps?)

After that (or quite frankly just the hash part for 99% people), I can then flash the iso to any and every hardware with complete verification

Although I feel like this still won't help if the firmware or the hardware itself can't be trusted. I mean even in corebooted chromebooks, the intel TPM only stops the ability of sending the bytecode over wire but it itself really can't be stopped. Maybe we will have risc-v machines but they would rather be really expensive.

I think tho librebooted thinkpads + nixos/guix can be really great for privacy perhaps. But what are your reasons why bootstrappability fascinates you (for me its this stacking aspect and then finally we get some useful os without having to trust anything but source which we can read/heck even audit ourselves or have the shared faith that the source code is audited by security people since its completely readable)

I love this project, what it's aiming to achieve. Thanks for sharing the links!

It's very interesting, making a C compiler that supports a small subset of C, enough to compile TCC. And the stack-based language as intermediate representation. I found a treasure trove of implementation notes, enjoying reading it. https://fransfaase.github.io/Emulator

Are they gonna keep doing this with Rust etc.?
The idea of bootstrapping is that you start with nothing, or at least with almost nothing. In case of stage0 (the first stage of live-bootstrap) this a small program that converts a file with hexadecimal characters (in pairs) to a binary file. From there you have to build everything. To compile Rust, you need a Rust or C compiler, I understand. I have no idea how hard it would be to build a minimal Rust compiler that could compile itself, one that not necessary performs all the checks that the (full) Rust compiler would do.

I think that Rust is build as part of live-bootstrap, but at a much later stage when the latest version of the GNU C compiler has been build.

There was a project [0] to write a bare bones rust compiler (no borrow checking) in C that aims to be able to build rustc in order to simplify bootstrapping, but it seems to have stalled.

[0] https://notgull.net/announcing-dozer/

You would get a C++ compiler going and then build mrustc and then use that to build rustc and then use that to build the version of rustc you want.
The latest version of g++ is written in C++. If I am not mistaken g++ 4.7.4 is the oldest version that is written in C. But it does not support the C++ version in which the latest version of g++ is written. For that you have to compile g++ 10.4.0 first. And g++ 4.7.4 cannot be compiled by the Tiny C Compiler (tcc). The total chain then becomes:

tcc 0.9.26 → tcc 0.9.27 → gcc 4.0.4 → g++ 4.7.4 → g++ 10.4.0 → g++ 13.1.0