kanidm / webauthn-rs

An implementation of webauthn components for Rustlang servers
Mozilla Public License 2.0
464 stars 79 forks source link

Build breaks on MSRV due to transitive dependency on bumpalo which exceeds our MSRV #427

Closed micolous closed 3 months ago

micolous commented 3 months ago

Building the WASM examples or webauthn-rs-proto for a WASM target fails:

 error: package `bumpalo v3.15.4` cannot be built because it requires rustc 1.73.0 or newer, while the currently active rustc version is 1.70.0
Either upgrade to rustc 1.73.0 or newer, or use
cargo update -p bumpalo@3.15.4 --precise ver
where `ver` is the latest version of `bumpalo` supporting rustc 1.70.0

This issue came up in a couple of recent PRs:

bumpalo is a transitive dependency of wasm-bindgen:

% cargo tree -i bumpalo
bumpalo v3.15.4
└── wasm-bindgen-backend v0.2.92
    └── wasm-bindgen-macro-support v0.2.92
        └── wasm-bindgen-macro v0.2.92 (proc-macro)
            └── wasm-bindgen v0.2.92

That in turn depends on bumpalo 3.0.0:

https://github.com/rustwasm/wasm-bindgen/blob/d25a68eaa778f339ea9deb147ddc76a1facfc625/crates/backend/Cargo.toml#L19-L20

bumpalo 3.14.0 would work with our MSRV and satisfy wasm-bindgen-backend's requirements, but cargo doesn't try to solve this itself.

wasm-bindgen also claims an MSRV of 1.57:

https://github.com/rustwasm/wasm-bindgen/blob/d25a68eaa778f339ea9deb147ddc76a1facfc625/Cargo.toml#L15

wasm-bindgen's true MSRV (ie: what their CI actually tests) appears to be 1.76, and the metadata is wrong. As this is out of our control, I've opened an issue upstream with some different options there.

As for what we can do, we'll have to provide a manual solution for Cargo that should work with 1.70.