Skip to content

fix(bindings): declare the real MSRV (rust-version 1.81 → 1.91)#211

Merged
drewstone merged 1 commit into
mainfrom
chore/bindings-msrv-1.91
Jul 24, 2026
Merged

fix(bindings): declare the real MSRV (rust-version 1.81 → 1.91)#211
drewstone merged 1 commit into
mainfrom
chore/bindings-msrv-1.91

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Follow-up to #198, closing its multi-shot review's sole blocking finding (review comment).

The bug

#198's security sweep bumped alloy 1.1.2 → 1.8.3 — load-bearing: the lru 0.16 RUSTSEC fix requires alloy-provider ≥1.4, which moves its lru pin ^0.13^0.16, which requires alloy 1.8.3. And alloy 1.8.3 declares rustc >= 1.91. But bindings/Cargo.toml and fixtures/Cargo.toml still declared rust-version = "1.81".

tnt-core-bindings is a published crate. Advertising 1.81 while the locked graph needs 1.91 means a consumer on Rust 1.81–1.90 hits confusing rustc X.Y is unsupported errors from alloy/ruint instead of a clear MSRV error.

I verified the true max MSRV is 1.91 (cargo metadata over the locked graph — every alloy 1.8.3 sub-crate declares 1.91).

The fix

  • rust-version 1.811.91 in bindings/Cargo.toml + fixtures/Cargo.toml — the declaration now matches what the graph requires.
  • bindings/CHANGELOG.md documents the MSRV bump and the two build-environment consequences of the required alloy bump, as a conscious record (the reviewer asked these be a deliberate decision, not an accidental cargo update side effect):
    • cmake + a C toolchain are now build-time requirements (aws-lc-rs/aws-lc-sys via reqwest 0.13 → rustls 0.23.41).
    • TLS trust root moved from bundled webpki-roots to the OS-native store (rustls-platform-verifier).

Why not cap alloy / force ring

  • Capping alloy is off the table: it would reintroduce the lru advisory that chore(security): sweep Dependabot advisories #198 fixed.
  • Not forcing the ring crypto backend (to drop cmake): alloy 1.8.3 defaults to aws-lc-rs; overriding a transitive crypto provider from a downstream crate is fragile (additive Cargo features, controlled by alloy/reqwest), CI already has cmake, and the protocol isn't live. Documenting the requirement is the right call; dropping cmake later is a deliberate alloy-feature change, not a security follow-up.

The other review findings are non-issues on main: the JS ones (vitest 3→4, esbuild override) were verified green in #198's own testing, and the remaining LOWs are informational/cosmetic.

Verification

cargo +1.91 check -p tnt-core-bindings --lockedgreen (35s; compiled alloy 1.8.3 + aws-lc-sys 0.42.0 against cmake 3.28.3). Three files changed, no lock change.

The Dependabot security sweep (#198) bumped alloy 1.1.2 -> 1.8.3 — load-bearing
for the lru 0.16 RUSTSEC fix (alloy-provider moves its lru pin ^0.13 -> ^0.16) —
and alloy 1.8.3 declares rustc >= 1.91. The locked graph's true max MSRV is 1.91
(verified via cargo metadata), but bindings/ and fixtures/ still declared 1.81,
so tnt-core-bindings — a published crate — advertised an MSRV it no longer met;
a consumer on 1.81-1.90 hits 'rustc is unsupported' from alloy/ruint.

Fixes the sole blocking finding on #198's multi-shot review. Verified the crate
builds on exactly 1.91 (cargo +1.91 check -p tnt-core-bindings --locked, green).

CHANGELOG documents the MSRV bump and the two accepted build-environment
consequences of the alloy bump: aws-lc-rs now needs cmake + a C toolchain, and
the TLS trust root moved from bundled webpki-roots to the OS-native store.

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — cc0a7f29

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-07-24T20:52:20Z

@drewstone
drewstone merged commit 6a063f8 into main Jul 24, 2026
1 check passed
@drewstone
drewstone deleted the chore/bindings-msrv-1.91 branch July 24, 2026 20:55
drewstone added a commit that referenced this pull request Jul 24, 2026
…was stale) (#212)

crates.io tnt-core-bindings 0.19.0 was published 2026-07-07, two days before
#209 (EventDriven per-job billing in the service settlement asset) merged and
regenerated the ABI. So the published 0.19.0 ships an intermediate 0.19 ABI that
was never deployed — its i_tangle.rs differs from the deployed contract's by
~900 lines. Any consumer pinning 0.19.0 (blueprint-sdk included) built against
selectors that don't match the live 0.19 deployment; the operator only worked
because it consumed bindings via a git patch, not the crates.io release.

0.19.1 carries main's current (deployed-matching) ABI. Also folds in the MSRV
declaration fix from #211 (rust-version 1.91). Publish-verified: cargo publish
--dry-run -p tnt-core-bindings packages + compiles clean on 1.91.
drewstone added a commit that referenced this pull request Jul 24, 2026
…ings version (#213)

The drift this prevents actually shipped: tnt-core-bindings 0.19.0 was published
2026-07-07, then #209 regenerated the ABI on 2026-07-09 under the SAME version.
crates.io versions are immutable, so the published crate kept an ABI ~900 lines
out of date from the deployed contract. blueprint-sdk and every operator built
from it linked selectors that don't exist on-chain, and nothing failed loudly —
the live operator only worked because a git patch masked the staleness (fixed by
republishing as 0.19.1 in #212).

The gate is pure git (no build, <5s): if a PR touches bindings/abi/** or
bindings/src/bindings/**, the version literal in bindings/Cargo.toml must differ
from the base. Validated against real history — fires on #209, N/A on #211.
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