diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-16 22:57:31 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 88c04dd6c392c6d8fc3a02408506e85d86f476d5 (patch) | |
| tree | 4462fcb19dce110c24595f000bd8303c69288689 /README.md | |
| parent | 1cb36ee39a8bbc2cf61c28003670d760841d6d3e (diff) | |
| download | sketchbook-88c04dd6c392c6d8fc3a02408506e85d86f476d5.tar.gz sketchbook-88c04dd6c392c6d8fc3a02408506e85d86f476d5.zip | |
Refuse a sketch library built by another compiler, backend or mode
abi.hash now covers the zig version, codegen backend and optimize mode: Zig's
own calling convention (Host.VTable, every Allocator) differs between them,
so a Debug host loading a ReleaseFast or LLVM library faulted on its first
draw. Libraries export sketch_build, and the host's refusal says what
differs and what to run instead.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -874,8 +874,11 @@ renderer migration work and the optional addon boundary. Host and sketch are built by the same `zig build`, so ordinary Zig types cross it (slices, tagged unions, `std.mem.Allocator`). `abi.hash`, a comptime hash -of every shared type's layout, guards against the one real hazard: a host -refuses a library built against different definitions. Everything that outlives +of every shared type's layout and of the zig version, backend and optimize +mode, guards against the real hazards: a host refuses a library built +against different definitions, or by another compiler or mode (`zig build +run` beside `zig build lib --watch -Doptimize=fast`: Zig's own calling +convention differs between them), and says what differs. Everything that outlives a call lives in host memory, since host code is never unloaded. Only the recorded `Event` and the reflected `Layout` are `extern`, because they are written to disk. |
