summaryrefslogtreecommitdiff
path: root/dev/root.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 02:30:14 -0300
committerGabriel Schneider <[email protected]>2026-11-21 02:52:47 -0300
commitdea2920233bbb64b20f7ccebd42ac5beab14033d (patch)
tree4d1622bffae6fbf653764ea33cb038afd6f02754 /dev/root.zig
parentee5b6aa3ef0bf398c5381498af40fa93d20cf0b3 (diff)
downloadpardes-dea2920233bbb64b20f7ccebd42ac5beab14033d.tar.gz
pardes-dea2920233bbb64b20f7ccebd42ac5beab14033d.zip
library: a browser's module is pardes's build's to make: build.zig exports `wasmModule(b, .{ .language = "rust" })` (the user's ruling: the self-contained module is exposed to the consumer's build.zig): wasm32-wasi, a reactor, one language's grammar and what it needs with tree-sitter's runtime and the highlighter, or with no language the patch view alone; its exports are abi/wasm.zig's (beside the other boundaries: a module of its own whose few globals are the page's, not a core's), the same in every module: `reserve`/`release` (toilet's, at least one byte so reserve(0) is a pointer), `highlight(path, path_len, text, len)` (toilet's without its diff flag: diffs go to the patch view now), `patch(text, len)` (a 20-byte header: the rows' text, a style byte a byte, and nine-u32 records: kind, old, new (0 for none), code_start, the row's text and its path as offsets, flags bit 0 no newline), `memory`, `_initialize`; only those are exported (export_symbol_names, not rdynamic: tree-sitter's and libc's symbols stay inside), and a panic is one `fd_write` to stderr and a trap (std's handler writes through std.Io and imported 26 more WASI functions): a language's module imports fd_write, fd_seek, fd_close (libc's streams, tree-sitter's debug output), the patch view's none, 24,533 bytes (11,108 gzip; with tree-sitter's runtime in it, 139,337); rust's is 1,290,182 (183,568 gzip; its parser object alone 1,134,394); test/consumer makes both through `wasmModule` and runs them under node (wasm.mjs: a page with every WASI import a stub reads the header and records back: rows, numbers, paths, the changed `*`, a no-newline flag, reserve(0), a highlight), saying so when there is no node; `sizes` installs one module a language of the manifest
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/root.zig')
0 files changed, 0 insertions, 0 deletions