diff options
| author | 2026-10-15 17:03:03 +0330 | |
|---|---|---|
| committer | 2026-10-15 17:03:03 +0330 | |
| commit | 7cb983bbea98d2038b2a8015a6d1f1afd40991c9 (patch) | |
| tree | ec3d88a15801207fc6d8d3c6d142617ffec85460 /ONBOARD.md | |
| parent | merge work/borrow: borrow returns before definition, borrows clause, borrow m... (diff) | |
| parent | bench: rss probe path fix (diff) | |
merge work/actors: wasm seed bootstrap (seed/MANIFEST), shared copy-on-write actor memory, top-level hold blocks on all backends and lsp
Diffstat (limited to 'ONBOARD.md')
| -rw-r--r-- | ONBOARD.md | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -43,12 +43,18 @@ build/bin/zy < examples/hello.zc ``` watch the output of `make`: the default memory map is generated -(`build/core/map/`), zc0 compiles the genome sources (stage 0), a core built -around that image compiles the compiler again (stage 1) and again (stage 2), the -two self-compiled images are compared, and the first becomes -`build/core/genome.bin`. then `zy`, `zym` and `zclsp` are built around it. - -you should be able to say: why the bootstrap needs three stages, what `mkgenome` +(`build/core/map/`), then `src/boot/boot.sh` checks the pinned seed +(`seed/zc.wasm`, the microcore with a compiler genome inside, built for WASI) against +the sha256 in `seed/MANIFEST` and runs it under wasmtime or node: the seed compiles the +compiler sources (g1), g1 compiles them again (g2), and g1 and g2 must agree (else g2 +compiles them to g3 and g2 and g3 must). the result becomes `build/core/genome.bin`; +then `zy`, `zym` and `zclsp` are built around it. no c compiler takes part in +compiling the compiler, and the seed is proven by the fixpoint rather than trusted. +`make seed` rebuilds the seed and its manifest from the current genome (needs clang +with wasm32 and wasm-ld; wasm-opt when found); `make genome-c` is the old bootstrap +through zc0 and the c core, kept for comparison. + +you should be able to say: why the bootstrap needs a second (sometimes third) stage, what `mkgenome` protects against (a compiler's error report taken for an image), and how a core finds its image (`src/core/genome.h`, `--embed-dir`). |
