Skip to content

lakefile: drop Blake3 from the native-decide dynlib - #607

Merged
samuelburnham merged 1 commit into
mainfrom
sb/blake3-precompile
Sep 3, 2026
Merged

lakefile: drop Blake3 from the native-decide dynlib#607
samuelburnham merged 1 commit into
mainfrom
sb/blake3-precompile

Conversation

@samuelburnham

Copy link
Copy Markdown
Member

Blake3 now precompiles its libraries, so Lake loads their shared objects -- which bundle the C and Rust FFI objects -- into any process elaborating a module that imports them. The Blake3 half of ix_native_decide_dynlib was assembling that by hand from a blake3_rs_shared cdylib, and that target no longer exists upstream.

The target keeps Ix's own externs, which nothing else supplies. Precompiling Ix.Unsigned instead would work, but only as its own library declared after Ix: both would claim the module, Package.findModule? resolves with findSomeRev?, and losing that race silently stops precompiling it -- with the symptom appearing as a missing native implementation inside a proof file rather than as a configuration error. A local dynlib naming its modules outright is worth more than the lines it costs.

The Blake3 pin moves to the revision that turned precompilation on, and moves in lakefile.lean, lake-manifest.json, flake.nix and flake.lock together. The lakefile drops the cdylib that the older revision still provides, so a pin left behind in any one of them pairs the new lakefile with a Blake3 that does not precompile -- and that mismatch surfaces as a missing native implementation inside a proof file rather than as a build error.

Blake3 now precompiles its libraries, so Lake loads their shared objects --
which bundle the C and Rust FFI objects -- into any process elaborating a
module that imports them. The Blake3 half of `ix_native_decide_dynlib` was
assembling that by hand from a `blake3_rs_shared` cdylib, and that target no
longer exists upstream.

The target keeps Ix's own externs, which nothing else supplies. Precompiling
`Ix.Unsigned` instead would work, but only as its own library declared after
`Ix`: both would claim the module, `Package.findModule?` resolves with
`findSomeRev?`, and losing that race silently stops precompiling it -- with
the symptom appearing as a missing native implementation inside a proof file
rather than as a configuration error. A local dynlib naming its modules
outright is worth more than the lines it costs.

The Blake3 pin moves to the revision that turned precompilation on, and moves
in lakefile.lean, lake-manifest.json, flake.nix and flake.lock together. The
lakefile drops the cdylib that the older revision still provides, so a pin
left behind in any one of them pairs the new lakefile with a Blake3 that does
not precompile -- and that mismatch surfaces as a missing native
implementation inside a proof file rather than as a build error.
@samuelburnham
samuelburnham marked this pull request as ready for review September 2, 2026 21:45
@samuelburnham
samuelburnham added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit 7675111 Sep 3, 2026
13 checks passed
@samuelburnham
samuelburnham deleted the sb/blake3-precompile branch September 3, 2026 08:43
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.

2 participants