Skip to content

Build the crypto binding on rust:1.98-alpine by adopting the paramant-core with bindgen 0.72 - #329

Merged
Apolloccrypt merged 2 commits into
mainfrom
chore/rust-1.98-oqs-bump
Sep 2, 2026
Merged

Build the crypto binding on rust:1.98-alpine by adopting the paramant-core with bindgen 0.72#329
Apolloccrypt merged 2 commits into
mainfrom
chore/rust-1.98-oqs-bump

Conversation

@Apolloccrypt

Copy link
Copy Markdown
Owner

Supersedes #313 (the rust 1.95-alpine -> 1.98-alpine bump; its commit is cherry-picked here unchanged). Depends on Apolloccrypt/paramant-core#24, which this PR pins by commit.

Why #313 failed

Not the Rust version: paramant-core's rust-toolchain.toml pins 1.95.0 and the failure reproduces with that toolchain inside the 1.98 image. rust:1.98-alpine is Alpine 3.24 with libclang 22.1.3, and bindgen 0.71 (what oqs-sys <= 0.11.0 requires) emits the forward-declared OQS_SIG as an opaque { _address: u8 } under libclang 22, hence E0609: no field alg_version on type &OQS_SIG. Two-line reproduction and the bindgen/libclang matrix are in paramant-core#24.

Change

  • relay/Dockerfile: base rust:1.98-alpine@sha256:a10e64dd... (from build(deps): bump rust from 1.95-alpine to 1.98-alpine in /relay #313); PARAMANT_CORE_COMMIT dc454d4 -> b90b3c5 (paramant-core#24: oqs 0.11.0 / liboqs 0.13.0, oqs-sys patched to bindgen 0.72); the comment block that documented the 1.95 pin now documents the cause.
  • .github/workflows/test.yml: PARAMANT_CORE_SHA 45a3d35 -> b90b3c5, so the relay crypto-suite gate runs against the same paramant-core the image ships.

No relay source changes.

Verification (local, NUC, Docker 29.6.1)

  • docker build of relay/ with this Dockerfile, --no-cache: binding stage Finished release [optimized] target(s) in 1m 57s, full image built.
  • In the built runtime image: require('@paramant/core') loads the musl binding; mldsaKeygen / mldsaSign / mldsaVerify round-trip (signature 3309 bytes, verify true).
  • Relay crypto suite on the host against the binding built from paramant-core b90b3c5 (node --test crypto/*.test.js): 144 pass, 0 fail.
  • paramant-core#24 CI: all five jobs green, including musl build - paramant-core-node on this exact rust:1.98-alpine digest, and the ML-DSA-65 / ML-KEM-768 KAT suites.

Byte-compatibility

Algorithm identifiers (ML-DSA-65, ML-KEM-768, SPHINCS+-SHA2-128f-simple, Falcon-512) are unchanged between liboqs 0.12.0 and 0.13.0; the 50 @noble-anchored ML-DSA-65 KAT vectors and the relay crypto suite verify unchanged. No wire-format or version-id changes.

Not done here

  • No merge, no deploy. Production stays on the 08-08 image.
  • paramant-core#24 should merge first. If it is squash-merged, its commit hash changes and both pins here must be re-pointed at the merge commit before this PR merges (b90b3c5 stays fetchable only while the branch exists).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJk2nCLCLmi3F71qkCUn7N

dependabot Bot and others added 2 commits September 2, 2026 15:19
Bumps rust from 1.95-alpine to 1.98-alpine.

---
updated-dependencies:
- dependency-name: rust
  dependency-version: 1.98-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…-core with bindgen 0.72

Dependabot's rust 1.95-alpine -> 1.98-alpine bump (#313) fails in the
paramant-core-binding stage with E0609 "no field alg_version on type
&OQS_SIG". The base image is not at fault: Alpine 3.24 ships libclang
22, under which bindgen 0.71 (pulled in by oqs-sys 0.11.0 and older)
emits the forward-declared OQS_SIG as an opaque struct. Rustc version
is irrelevant, paramant-core's rust-toolchain.toml pins 1.95.0 anyway.

paramant-core#24 fixes that at the source (oqs 0.11.0, oqs-sys patched
to the upstream commit with bindgen 0.72, musl CI job on this same
rust:1.98-alpine digest), so this takes the base bump from #313 and
moves both paramant-core pins, PARAMANT_CORE_COMMIT in the Dockerfile
and PARAMANT_CORE_SHA in the crypto-suite job, to that commit. The
Dockerfile comment that documented the 1.95 pin now documents the
actual cause instead.

Verified locally: `docker build` of relay/ with this Dockerfile
completes (binding stage finishes `cargo build --locked --release`,
final image builds); in the runtime image `require('@paramant/core')`
loads the musl binding and ML-DSA-65 keygen/sign/verify round-trips;
the relay crypto suite (144 tests) passes on the host against the
binding built from paramant-core b90b3c5.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJk2nCLCLmi3F71qkCUn7N
@Apolloccrypt
Apolloccrypt merged commit c45d1c6 into main Sep 2, 2026
12 checks passed
@Apolloccrypt
Apolloccrypt deleted the chore/rust-1.98-oqs-bump branch September 5, 2026 18:55
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