Skip to content

build: embed the default spec as JSON instead of rkyv - #1

Merged
tvanderstad merged 3 commits into
lockbookfrom
travis/json-spec
Nov 15, 2026
Merged

tvanderstad merged 3 commits into
lockbookfrom
travis/json-spec

Conversation

@tvanderstad

Copy link
Copy Markdown

Merge this first; lockbook/lockbook then points its mitex rev at the merged commit.

Crates that depend on mitex or mitex-spec-gen no longer pull in rkyv 0.7, which has an advisory with no 0.7 fix (RUSTSEC-2026-0235). The built-in spec is now embedded as default.json (newly added to mitex-artifacts) and loaded through the serde path that already reads typst's query output. For example, Lockbook's Cargo.lock loses rkyv and 12 crates only it pulled in.

mitex-spec keeps rkyv as an opt-in feature, and mitex-cli and mitex-wasm turn it on, since their APIs exchange rkyv bytes. mitex-spec also failed to build with rkyv off; that is fixed here.

The JSON spec loads into the same 1029 commands as default.rkyv.

You're accepting:

  • The first formula takes about 0.3 ms more to load the spec, and the embedded spec is about 43 KB larger (pretty-printed JSON).
  • rkyv stays in this repo's own lockfile through mitex-wasm and mitex-cli.
  • The wasm plugin was not built or run.

The stream module uses rkyv unconditionally, so mitex-spec failed to compile
with default features off.
rkyv 0.7 has advisories with no 0.7 fix (RUSTSEC-2026-0235). The default
spec now loads from default.json through the serde path the typst query
already uses, so mitex, mitex-spec-gen and their dependents no longer pull
in rkyv. mitex-spec keeps rkyv as an opt-in feature, which mitex-wasm and
mitex-cli enable.
@tvanderstad
tvanderstad marked this pull request as ready for review November 15, 2026 06:06
@tvanderstad
tvanderstad merged commit 75ffdae into lockbook Nov 15, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant