Repository navigation
Lini 1.0.5
The compiler can be handed its assets rather than left to read them. That is one new field on Options, and it is what lets a Lini figure carry a local image on a host with no disk — the browser playground, a bundler plugin, a Markdown pipeline compiling a page. The binary is unaffected: the CLI reads from disk exactly as before.
cargo install liniThe npm surface is breaking. compile, compile_html, compile_static and diagnostics each take the asset table alongside the source, so lini-wasm@1.0.5 is not a drop-in for 1.0.4. Pass {} if a document names no local file.
Options::assets — the bytes, keyed by the src: as written
An |image| src: naming a local file could only ever be read from disk, which made it unreachable from the one host that has no disk. In WebAssembly the read failed with "operation not supported on this platform", so the playground answered a sheet with an R010 and a blank pane — and a reader concludes the feature is broken, not that the platform is.
The table is keyed by the src: string exactly as authored, because that is the only thing a host knows about the file. It is consulted before any read and joins the existing embedding path rather than opening a second one: the same id-isolation, the same classification, the same determinism from the bytes. An asset that is neither supplied nor readable is still the error at the src: span.
The proof is a test that could not previously exist
tests/wasm.rs compiles every sample through the browser artifact and demands byte-equality with the binary, and it had to skip every image-bearing sample — the exact samples worth comparing. That filter is gone: the binary resolves assets/logo.svg against samples/ and reads it, the driver passes the same file through the asset table, and drawing_sheet's two outputs now match byte for byte. One embedding path, reached two ways, and a corpus check that fails if the last |image| sample ever leaves.
Two figures redrawn
- The sheeted screw's hex socket turns. The end view drew the socket flat-top, so the dimension between
:leftand:rightspanned tip to tip — 7 is the across-corners of a 6 mm hex, not a key size.rotate: 90stands it point-up and the anchors turn with the geometry, so the callout is now 6, the DIN 912 M8 key. The side view's hidden socket follows to the across-corners width, and the projection construction lines — which left one card at a bbox midpoint, mid-shank, in open air — are gone:align: originalready reads the views as aligned, and a finished ISO sheet carries no construction chrome. - The ER hero wires two of its cards field to field. SPEC 8 has promised field-level wiring since the beginning and 1.0.4 made it draw, but the showroom never showed it.
user.pk -o< order.user_fk:leftnow leaves one card at itsidrow and lands on the other atuser_id. Worth knowing: a cell anchor places the endpoint along a wall but does not pick the wall, so a field-level wire usually wants an explicit:sideto read as one.
Every showcase PNG under assets/ was re-rendered from the SVG beside it; most had drifted months behind.
Markdown, anywhere remark runs
remark-lini draws the same ```lini fences in Docusaurus, Next and MDX, Gatsby, or a bare unified() pipeline — on npm as remark-lini-lang. astro-lini 0.2.0 is now the Astro wrapper over it rather than the only door, and both ride the asset table above.
The language is unchanged. SPEC.md is the contract, and 1.x stays compatible with it.