ZigBase 0.2.0
·
1482 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Fixed
- Provisioning no longer leaks at shutdown:
applySpecsandrunMigrations
now wrap all internal allocations in a short-lived arena (backed by the
caller's allocator), so intermediate allocations fromtopoOrder,
collections.create/ddl.quoteIdent,schema.indexesToJson, and the
prov:migration-name string are all freed before the call returns. The
long-lived gpa accumulates nothing during startup provisioning. - Reserved field names in comptime
.collectionsare rejected at compile
time: declaring a field whose name is reserved by the engine (id,
created,updated,email,username,passwordHash,tokenKey,
verified) now produces a clear@compileErrorat build time rather than an
opaque validation failure at startup.
Added
- Static file serving: root-path fallback with four comptime modes — runtime
--serve-static <dir>flag (default),.disabled, comptime-hardcoded.dir, or
assets fully.embeddedin the binary via the newembedStaticDirbuild helper
inbuild.zig. Embedded mode computes a CRC32 contentETagat build time and
handlesIf-None-Match/304 itself. Dir mode (--serve-staticor comptime.dir)
delegates caching to facil.io'ssendFile(ETag,Last-Modified,
Cache-Control: max-age=3600, 304). All modes addX-Content-Type-Options: nosniff
and lexical traversal protection (.., backslash, NUL). Static misses return
plain-text 404;/api/*misses keep the JSON envelope. - Example frontends: all three examples now ship an Astro + React-islands
frontend (one per static mode: blog = runtime flag, golfsim = hardcoded dir,
plugins = embedded). Blog and golfsim also gain comptime.collectionsschemas so
the examples provision themselves at startup.