Why. The embedding API is near Lua-class (multi-state, handles, buffers, abort flag, trace sink — proven by a bare-metal OS consumer), but an embedder must hand-replicate the SOURCES-minus-main.c list from the Makefile. Lua's time-to-embedded-in-minutes comes from the one-file amalgamation; this is the last real delta.
What.
tools/amalgamate.sh emitting eigenscript_all.c + eigs_embed.h ("copy two files, call eigs_open").
make lib producing libeigenscript.a.
- Anti-drift: convert
make embed-smoke and ouroboros/aot/build.sh to link against the amalgamation/lib so the artifact can never rot (three ad-hoc consumers of the same source list exist today).
docs/EMBEDDING.md "drop-in" quickstart section, with the trace-sink/replay and abort seams as headline features.
Acceptance. A fresh directory with the two amalgamation files + a 20-line host builds and runs eval with gcc alone; embed-smoke passes linked against it; CI covers the amalgamated build.
Effort: days. Source: 2026-07-04 survey (embedding dimension).
Why. The embedding API is near Lua-class (multi-state, handles, buffers, abort flag, trace sink — proven by a bare-metal OS consumer), but an embedder must hand-replicate the SOURCES-minus-main.c list from the Makefile. Lua's time-to-embedded-in-minutes comes from the one-file amalgamation; this is the last real delta.
What.
tools/amalgamate.shemittingeigenscript_all.c+eigs_embed.h("copy two files, call eigs_open").make libproducinglibeigenscript.a.make embed-smokeandouroboros/aot/build.shto link against the amalgamation/lib so the artifact can never rot (three ad-hoc consumers of the same source list exist today).docs/EMBEDDING.md"drop-in" quickstart section, with the trace-sink/replay and abort seams as headline features.Acceptance. A fresh directory with the two amalgamation files + a 20-line host builds and runs eval with gcc alone; embed-smoke passes linked against it; CI covers the amalgamated build.
Effort: days. Source: 2026-07-04 survey (embedding dimension).