diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 22:49:11 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 23:38:31 -0300 |
| commit | c36e38e0a26f9bdef2892621b99390dedd35686d (patch) | |
| tree | c5817e8f3be6c9a2c930bd0d3576752e5feef070 /docs | |
| parent | 227111c84a2945087abb4395daf63c7b23ba5bab (diff) | |
| download | pardes-c36e38e0a26f9bdef2892621b99390dedd35686d.tar.gz pardes-c36e38e0a26f9bdef2892621b99390dedd35686d.zip | |
kinds #48, the export rule finished: every Zig kind declares `pub const pardes_addon = addon.ops(T)` and calls `addon.exportLib(&pardes_addon)` in a comptime block, which exports it only when the output is a library (Zig 0.17 analyses no `pub const` of a library's root and no comptime block of a type made in a generic function, so the export cannot live in `ops` alone: one comptime line in the kind is the spelling that works), and a pardes with kinds compiled in reads the declarations; image.zig's `pub export`, snake's and life's `export` go, no rename anywhere, and fake.c stays the loader's test, never compiled in
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/typ/reference.typ | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index db9cdb54..db090d24 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -983,8 +983,10 @@ Exec, a message, a new text pane, its selection) it is handed at load. `addons/fake/fake.c` uses every function; a kind with only a head and `paint` is a valid one. In Zig, `src/kinds/addon.zig` (over the same header, and nothing of the core) makes the `pa_ops` from a struct of the -functions a kind has (`export const pardes_addon = addon.ops(Snake);`), -wrapping every function of the header and every call of `pa_api`: the +functions a kind has (`pub const pardes_addon = addon.ops(Snake);`, and +`addon.exportLib(&pardes_addon)` in a `comptime` block, which exports it +from a library alone, so a pardes with kinds compiled in reads each one's +declaration), wrapping every function of the header and every call of `pa_api`: the pane's arena and pardes's heap as `std.mem.Allocator`s, typed keys, clicks and views, a window to `put` text in (column first, where the header's `pa_put` is row first), a deadline for `tick`, a `prefix` written after |
