Repository navigation
Lasm 0.11.0
A minor release with breaking changes: Stage 0 (API surface) is complete. Every public API decision in docs/API_DECISIONS.md and docs/api/decisions/ is now implemented and released, and the example apps and templates use only the final APIs. Upgrade with npm install -D @lasm/cli@0.11.0; ^0.10.0 does not pick it up. There are no compatibility aliases, deprecation notices or old-name hints: each breaking change below has a one-line migration.
Breaking changes and migration
lasm packageis removed (decision 0.7-7, #388). Migration: uselasm build <Main.lean> --target X.Lasm.JS.onEdgeis deleted in favour ofLasm.target(decision 0.6-20, #388). Migration:if ← onEdge then …becomesif Lasm.target == .workers then …(or amatch Lasm.target), withimport Lasm.Target.Lasm.JS.Class(Lasm.JS.Class.define) and the builtin modulelasm:classare deleted (A6.2, #385). Migration: write the class in a project.mjsfile, its methods calling Lean functions passed withFunction.ofSyncFn/ofFn(docs/JS_BINDINGS.md, "JavaScript classes").- The browser check moves into
lasm build(0.7-7, #388). Migration:lasm package dist --target browserbecomeslasm build <Client.lean> --target browser, which checks its output againstlasm-manifest.jsonand writes_headers(a project's ownpublic/_headersis kept). - Azure Functions and Cloud Functions builds no longer inject their framework package (0.7-7, #388). Migration: list
@azure/functionsor@google-cloud/functions-frameworkin the app's ownpackage.jsondependencies, aslasm init --deploy azure-functions|cloud-functionsalready writes. - No hints for Lasm's own earlier names (decisions 0.7-24, 0.7-9, #384):
--target azure,--target gcfand--deploy lambda-zipare refused like any unknown name, with the list of targets. Migration: useazure-functions,cloud-functionsand--deploy lambda. - Lasm no longer changes elan (decision 0.7-25, #373, #384), so a native
lake buildkeeps working afterlasm build. Migration: if an older Lasm set an elan override in your project, runelan override unsetthere once.
New
Lasm.target : Lasm.Target(import Lasm.Target; decision 0.6-20, #388): the--targetthe program is built for, on every target including WASI, wasi-http and Fastly.Targethas one constructor per target (.node,.lambda, ….netlifyEdge, ….wasiHttp,.browser) andTarget.namegives the CLI name. The build stamps it in at link time;lasm runand a plainlasm buildreport.node.- Missing-import hints for the whole library (decision 0.3-20.1, #386). The hint under Lean's "Unknown identifier" now covers every public
Lasm.*module, not only the generatedLasm.JS.*bindings. For example,divgivesimport Lasm.UI,HttpReq.newgivesimport Lasm.Fastly, andValuegivesimport Lasm.JS.
Editor
- The Lean editor uses the project's own toolchain (#373, decision 0.7-25). Lasm 0.3.0 to 0.10.0 set the project directory's elan override to Lasm's own toolchain (
lasm-4.35.0-…), which had Lean's C compiler only when a Lake package had C code, so a nativelake buildof alean_exefell back tocconPATH, or failed when there was none. The editor now runslean-toolchain(Lean 4.35.0) and findsLasm.*through Lasm's Lake package ([[require]] lasm, path.lake/lasm-library);lasm editoradds the require when it is missing and writeslean-toolchainwhen there is none. Thanks to @paulbutcher for the report and the analysis.
Errors
- A failed build step reports both of its output streams (#315, #365). When Lake wrote anything to stderr during a failing step, such as the
info: <package>: remote URL changednotice that a GitinsteadOfURL rewrite causes on every run,lasm buildprinted only that and hid the entry module's Lean error, whichlake leanwrites to stdout. The CLI now prints the step's stderr, then its stdout, and shows text that appears on both streams once.lasm dev,lasm dev --target browser, the Vite plugin,lasm editor, the Lasm.JS binding reader, Lake workspace loading and package C-code diagnostics use the same rule. Thanks to @paulbutcher for the report and the reproduction.
Fixes
- Lasm's tar reader refuses a malformed number in an extended header (#371). A GNU long-name or pax header whose mode, owner, time or device number is not a number was accepted, since those fields mean nothing on an extended header. Python's tarfile and GNU tar refuse such archives, and now Lasm does too:
Invalid tar archive: a mode is not a number(ora device number, and so on). No archive that npm, GNU tar or Lasm writes is affected. Found by the nightlytarfuzz campaign.
Decisions
- WebSockets on Node:
Node.servegets no upgrade hook in Stage 0. A Node program that serves WebSockets binds an npm package such aswswith@[js], as Tandem does (docs/api/decisions/0.4.md, 0.4-7.3; #366). - Where the libraries live (A56.2): every
Lasm.*library (Lasm.JS, the generated hosts, Lasm.WASI, Lasm.Fastly and Lasm.UI) stays inside@lasm/cli; a library becomes its own@lasm/*package only when it has users who do not need the compiler, or a release cadence of its own. Nothing changes for programs (docs/api/decisions/0.6.md, A56.2; #374).
Example apps
- Porter on @lasm/cli 0.10.0 (#364). Its SQLite on Node, Deno and Bun goes through the generated
Lasm.JS.Node.Sqlite(DatabaseSync.new, NULL asnone) andLasm.JS.Bun.Sqlite(oneDataper binding), so Porter has no hand-written JavaScript binding left. Its proof checks use@lasm/cli/lean'slasmLean, and its Azure and Google scripts arebuild:azure-functionsandbuild:cloud-functions. - Tandem on @lasm/cli 0.10.0 (#370).
- Its SQLite modules use 0.10.0's generated shapes:
DatabaseSync.new,Array (Option …)parameters, and Bun's one value per binding. The hand-writtennew DatabaseSyncis gone. - The proof scripts use
@lasm/cli/lean(lasmLean). - The one hand-written binding left is
wson Node (docs/api/decisions/0.4.md, 0.4-7.3).
- Its SQLite modules use 0.10.0's generated shapes:
- Ledger on @lasm/cli 0.10.0 (#367).
- Its SQLite modules use 0.10.0's generated shapes:
DatabaseSync.new,Array (Option …)parameters, and Bun's one value per binding. The last hand-written binding (new DatabaseSync) is gone. - The proof scripts use
@lasm/cli/lean(lasmLean). build:azureandbuild:gcfare nowbuild:azure-functionsandbuild:cloud-functions, matching the targets' names.
- Its SQLite modules use 0.10.0's generated shapes:
- Tandem: two sync bugs found by the DST nightly's heavy faults (#369, #375).
- The server pushes a request's operations that were already in the log (an ambiguous commit's, answered 503) from where the log holds them. It pushed the reply (the log from the client's cursor), which missed them when the client was already past them (it had them from a long-poll) or more than a chunk behind them.
- The editor syncs again when a WebSocket opens while a sync is in flight, since the server may have answered that sync before the socket opened.
- Seeds 311319686, 509005383 and 766346062 are regression seeds in
tandem.yml.
- Porter, Ledger and Conduit list their Azure and Google framework packages themselves and build every platform with
lasm build --target(#388).
Internals (no change to how programs build or run)
- The API inventory check (
scripts/api/inventory.mjs) also counts and checks the sub-ids that only a detail heading defines (0.4-17.1,A56.1): each must be well-formed, defined once, and a sub-id of an entry with a table row. Ids of the form0.N-M.Kare accepted in tables too (#374). - The API decision records, ROADMAP.md's Stage 0 state and the performance ratchet's disk-space and build-memory rows are brought up to date with 0.9.0 and 0.10.0 (#374, #376), and record Jordan's Stage 0 sign-off of 2026-11-24 (#387).
- The Linux resource guard for CI and maintainer workloads (
scripts/full-lean/run-bounded.mjs) counts the working set (memory.current less inactive file cache, as the kubelet anddocker statscount it) toward its proactive budget, as the macOS and Windows guards already did (#389). Page cache from the toolchains a build extracts had stopped Conduit's and Porter's Netlify Functions and Lambda builds on 16 GiB runners at 4.3 GiB, far below Netlify's 8 GiB build allowance. The kernel cap (MemoryMax) and the pressure and host-headroom stops are unchanged. SAM-served Lambda tests now use the digest-pinned image (--skip-pull-image) instead of asking public.ecr.aws for a newer one at every start. - CI caches verified source archives and downloads Zig from community mirrors with a stall timeout (#390). The
ui-decodefuzz oracle asks the model about every frame's slot names (#372).