Repository navigation
Conversation
lbf-rust.nix pins lbr-prelude/plutus-ledger-api to crates.io, so edits to runtimes/rust/lbr-prelude never reached generated code or the testsuites. In-repo lbfRust callers now pass settings.rust.localCrates as extraVersions (public lib.lbf-nix defaults unchanged). plutus-ledger-api 3.1.0 is fetched from crates.io with its lbr-prelude dep rewritten to the local runtime, replacing the vendored copies of plutus-ledger-api and is-plutus-data-derive. Drops the malformed, unused hbls flake input. Testsuite Cargo.lock files still need regenerating under nix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
hbls.cabal (ecef8c6) never links blst, so loading it (PlutusTx plugin) failed with undefined blst_* symbols. Add pkgconfig-depends: libblst, the same blst cardano-crypto-class already links here. Regenerate lbt-prelude-rust/lbt-plutus-rust Cargo.lock for the local path deps, and apply nixfmt/cabal-fmt so pre-commit passes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
hbls vendors blst v0.3.17's C sources but not its assembly, and its .cabal compiles neither. blst has no portable C path on x86_64/aarch64, so add v0.3.17's build/ (pinned) next to the vendored C and declare c-sources: cbits/server.c and asm-sources: cbits/build/assembly.S, as blst's own build.sh does. The resulting hbls .so defines all blst_* symbols itself and has no libblst dependency. Reverts the previous pkgconfig-depends: libblst approach, which defeated the point of hbls vendoring blst. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
hbls b9aafc7 vendors blst's assembly and declares c-sources itself, so the library links with no help from us. Revert settings.nix's hbls-src to the original plain fetch, bumping only rev/hash, and drop the blst v0.3.17 fetch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the local-development problem on
sean/experimental-nix-fixes-2: generated Rust code and the Rust testsuites now build against this repo's ownlbr-prelude/plutus-ledger-apiinstead of crates.io, so edits toruntimes/rust/lbr-preludeare actually picked up.Root cause
extras/lbf-nix/lbf-rust.nixpinslbr-prelude = "0.1.3"andplutus-ledger-apifrom crates.io, and the testsuiteCargo.tomls do the same, so local runtime changes never reached generated code. The workarounds on the branch didn't take effect:plutus-ledger-apihad itslbffeature disabled (90cfg(feature = "lbf")blocks, including the Json impls generated code needs);lbr-preludewas renumbered to 0.1.0, which doesn't satisfy pla's^0.1.3, so the[patch.crates-io]entries never applied;-v0, which brokelbf-plutus -> lbf-prelude.Changes
settings.rust.localCrates, passed asextraVersionsby the 4 in-repolbfRustcallers. The publiclib.lbf-nixdefaults stay on crates.io.runtimes/rust/plutus-ledger-api/build.nix: fetches the published pla 3.1.0 crate (checksum from staging'sCargo.lock) and rewrites itslbr-preludedep to the local runtime. This replaces the vendored copies ofplutus-ledger-apiandis-plutus-data-derive(~17k lines, identical to the 3.1.0 release apart fromCargo.toml).b9aafc7, which compiles hbls's own bundled blst C and assembly. Before that commit, hbls's library defined noblst_*symbols, so loading it (PlutusTx plugin) failed withundefined symbol: blst_scalar_from_lendian; minimal repro. The hbls source block insettings.nixdiffers from the branch only in rev/hash; nothing in this PR patches hbls or links blst.hblsflake input (github://..., locked as a path);flake.lockis back to staging's.pre-commitpasses.Verification (x86_64-linux)
All 31
checksbuild, includinglbt-plutus-rust-test(131 tests),lbt-prelude-rust-test, clippy, andcheck-lbt-plutus-plutustx(383 tests, against hblsb9aafc7). EverypackagesanddevShellsoutput evaluates. A monolithicnix flake checkwasn't completed locally: evaluation needs more than 11G and the machine's earlyoom killed it, so the checks were run per attribute instead.Known gaps
hbls
b9aafc7:G1Point/G2Point==is inverted (src/HBLS.hslines 56 and 150 testblst_p*_is_equalwith(== 0), but it returns 1 when equal), somempty == memptyisFalse. hbls also can't be consumed as a cabalsource-repository-packagebecause its headers aren't inextra-source-files. Neither affects this PR's checks; both still need to be reported to hbls.Rust maps
G1Element/G2Elementto the placeholderlbr_prelude::types::Unsupported, which has no Eq/Json impls. Any schema that uses them will fail to compile for Rust.check-lbt-plutus-plutustxneeds about 18.6 GB peak for GHC on one test module (PlutusTx plugin); on smaller machines run it with--max-jobs 1.Not cleaned up here (unrelated to the fix): the commented-out block in
lbf-haskell.nix, thelbr-plutarch.cabalbounds, and the newline change inlbt-prelude-haskell/cabal.project.🤖 Generated with Claude Code