commit 5d6f9537f08513ea1d578cee01a91a6e36258991 (tree)
parent e1ec6d2ccf66ab37185a9cdd900ec5aa3f6cf6b5
Author: Motiejus <motiejus@jakstys.lt>
Date: Sat, 7 Mar 2026 09:11:22 +0200
README: document exceptions
Diffstat:
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/stage0/CLAUDE.md b/stage0/CLAUDE.md
@@ -47,15 +47,6 @@ engineer the output and recreate it directly.
4. **Test.** `zig build test-zig0` — iterate until the test passes.
-### Allowed hardcoding
-
-**callconv = .c and wasm32-wasi target are OK** — this is a bootstrap
-interpreter targeting only that platform. Don't make these configurable.
-
-Everything else must be computed by porting the upstream functions that
-produce the values. Do not hand-code enum tags, field indices, type indices,
-or any values that come from running upstream logic.
-
### No workarounds — always port
When a test fails, the only correct response is to port the upstream
diff --git a/stage0/README.md b/stage0/README.md
@@ -13,6 +13,12 @@ The goal of stage0 is to be able to implement enough zig to be able to build
3. AstGen: DONE, written fully by an LLM.
4. Sema: in progress.
+Outputs of each stage must be byte-by-byte identical, except:
+
+- target `wasm32-wasi` is ok to be hardcoded.
+- `callconv = .c` is ok to be hardcoded.
+- `undefined` bytes may differ between the two.
+
# Testing
Quick test: