diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 00:24:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | f2829440b0f933422e1da5394870505d3c2d67d6 (patch) | |
| tree | 1404a30697f3b64de5d54b52a74007143d40e4e3 /README.md | |
| parent | 20bfc56562068ff963281d562cba17a65880ec2d (diff) | |
| parent | 2ddceb90430806905988ae9bef4b3d921f75515e (diff) | |
| download | sketchbook-f2829440b0f933422e1da5394870505d3c2d67d6.tar.gz sketchbook-f2829440b0f933422e1da5394870505d3c2d67d6.zip | |
Merge the audio work and the incremental reload loop
The mixer's knee, newSound, sfxr, voice rate and groups, the scope's public pieces, micscope and spheres as examples; with the loader workaround for Zig 0.17.1's incremental linker and the panic-trace link. The README's hot-reload bullet takes the incremental loop's paragraph; zig build test: 164/164 steps, 132/132 tests.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -748,7 +748,18 @@ a talk with a slider, a loop, a choice, two slides and `beside`. - **Hot reload.** It watches the library file and loads each new build through a symlink with a fresh name (a build must replace the file, as `zig build` - does, not rewrite it in place). + does, not rewrite it in place). `zig build lib --watch -fincremental + --debounce 0` makes a reload take tens of milliseconds instead of a second: + Zig recompiles only what the edit changed, and starts as soon as a file is + saved instead of 50 ms later. Its limits, with Zig 0.17.1: the incremental + linker is new, and a library of it that does not link libc loads only + through a host workaround that Zig 0.18 makes unnecessary; if a reload ever runs code other than what you + wrote, stop the watch and rebuild without `-fincremental`. The library is + larger (27 MB instead of 10 for a small sketch), the watching compilers + stay in memory (about 300 MB for a small sketch, 1.3 GB for a game with C + and shaders), and a save that touches several files may build more than + once. The cache grows with each start of the watch (65 MB for a game), + not with edits. - **State file.** `<name>.state` holds the live State, shared via `MAP_SHARED`, so the file is up to date as it changes. Its header carries the reflected layout, so a layout change migrates it field by field, with |
