```Currently, Mes consists of a mutual self-hostin...
# linking-together
m
Copy code
Currently, Mes consists of a mutual self-hosting scheme interpreter and C compiler. It also implements a C library. Mes, the scheme interpreter, is written in about 5,000 lines of code of simple C. MesCC, the C compiler, is written in scheme. Together, Mes and MesCC can compile a lightly patched TinyCC that is self-hosting. Using this TinyCC and the Mes C library, it is possible to bootstrap the entire Guix System
https://guix.gnu.org/en/blog/2020/guix-further-reduces-bootstrap-seed-to-25/
👍 4
Copy code
Today's release marks the first C compiler hand written in Assembly with structs, unions, inline assembly and the ability to self-host it's C version, which is also self-hosting
https://savannah.nongnu.org/projects/stage0
Copy code
The Scheme interpreter is written in ~5,000 LOC of simple C, and the C compiler written in Scheme and these are mutual self-hosting
https://www.gnu.org/software/mes/
k
I remember a presentation by Mes' main author, Jan Nieuwenhuizen, at a Guix meeting in 2019. An interesting lesson in language complexity. C isn't as simple as it seems to be!
v
Wonder if we can self host this into wasm.
k
That should be possible in the long run, if you complement WASM with a library for local resource management. You don't want to lose your software installation when you close your browser. But "possible" is very different from "easy". The hard work behind Guix is not designing and implementing the infrastructure, but patching thousands of software packages to fit into the framework. That's hard enough for today's Guix which is a variant of Linux (same kernel, same basic filesystem (POSIX), but very different conventions for file management). For WASM, it's likely to be worse.
👍 1