Changelog
What each release of lith changed.
Until 1.0, a minor release may change the API; its entry says what to change in an app.
v0.1.0 (2026-10-13)
The first release: the runtime for Go, SQLite and Datastar apps, with a template for new apps, a skill for coding agents and the website at lith.zweiundeins.gmbh. It needs Go 1.27 and builds with CGO_ENABLED=0.
Packages
sqlite: one write connection and aquery_onlyread pool; pragmas; migrations byuser_versionor a project's own runner; read-only opens;ViewandViewValuein one snapshot, joining a transaction a ctx carries;VACUUM INTObackups. Each read connection keeps the 128 statements it ran last prepared.writer: the single writer.Send,DoandDoValuequeue commands, which run in batches of one transaction with a savepoint each, on statements prepared once;OnceandOnceResultfor requests a client retries;Flush;Exclusivefor work between batches; checkpoints andPRAGMA optimize.live: commits touch topics, topics mark views dirty, and each tick renders every dirty view once, in one read transaction per worker, for all the streams that watch it. Presence,Every,WatchandUnwatch,WriteTick, a stream cap, heartbeats, andSpec.Reconnect, which ends each stream withsse.Reconnectwhen the server stops, so that pages open their stream again on the next process.sse: Datastar's events, formatted once and written to many streams; zstd, brotli or gzip per stream, with a deadline on every write; a memory budget that shrinks the streams' windows as more open; idle streams that give their encoder back (Hibernate).edge: sessions, CSRF, the client's address behind a proxy, a CSP with a nonce, compression, precompressed static files, rate limiters, request logs, health checks.tenant: one open database per account, refcounted, evicted at a soft cap.dbmetrics: statement timing and a slow-query log through a wrapping driver.loadtest: the writer and the render loop under load, in process, without HTTP.backup(a module of its own): Litestream to S3, a restore when the file is missing, snapshots, a daily verify.dbmetrics/promandprom(modules of their own): the statements', the writer's, the hub's and the stream budget's numbers in Prometheus.
Defaults to know
synchronous=NORMAL: a power loss or a kernel crash can undo the commits of the last 35 seconds or so; a crash of the process loses none.sqlite.Options{Synchronous: "FULL"}syncs every batch.- The streams share a memory budget of half of GOMEMLIMIT, or of the cgroup's limit: a few streams compress with 512 KiB windows, many with 256 KiB, and the rest go out uncompressed, or not at all with
Refuse. - An idle stream keeps its encoder until
live.Options.Hibernateis set. - A page opens its stream with
retry: 'error'from an element with an id, the oneSpec.Reconnectnames.
Tools
cmd/lith-newcopies the template into a new module that requires the lith it ran from: a guestbook with tests, CI, a systemd unit, a Caddy block, a deploy script with rollback and a backup timer.skills/lith: the rules for coding agents, with review commands, Datastar notes, recipes and performance numbers.bench: the writer, render and stream benchmarks, with the commands to run them again (bench/RESULTS.md).
Website
lith.zweiundeins.gmbh runs on lith, from site/: the landing page, the docs (guides that follow one app, Datastar notes, performance, the package reference from the doc comments, a review checklist and this changelog), and eight live demos: a guestbook, a writer race, a stream inspector, a pixel canvas, a shared board, a cursor party, a Game of Life and a million checkboxes.