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 #515 by @ryankurte fix
Fixes #511 thanks @jcape for pointing out the warning message
We fix the cross build with override which was broken due to rustc not relaying curve cfg's.
Given it is difficult to use we also default to
cfg(curve_25519_dalek_bits="32")
with a warning instead of a hard error.Slightly vary of using
CARGO_CFG_
given rustc removes them in build.rs for#[cfg()]
beyond targetcfg
set.Cc/ @jrose-signal
Test matrix on x86_64-unknown-linux-gnu native host:
$ rustup default 1.60 ; cargo clean
$ rustup default stable ; cargo clean
$ rustup default nightly ; cargo clean
Dalek64
$ cargo build
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="64"' cargo build
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="64"' cargo build --target wasm32-unknown-unknown
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="64"' cargo build --target aarch64-unknown-linux-gnu
$ cargo build --target aarch64-unknown-linux-gnu
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="64"' cargo build --target i686-unknown-linux-gnu
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="64"' cargo build --no-default-features --target thumbv7em-none-eabi
Dalek32
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="32"' cargo build
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="32"' cargo build --target wasm32-unknown-unknown
$ cargo build --target wasm32-unknown-unknown
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="32"' cargo build --target aarch64-unknown-linux-gnu
$ cargo build --target i686-unknown-linux-gnu
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="32"' cargo build --target i686-unknown-linux-gnu
$ cargo build --no-default-features --target thumbv7em-none-eabi
$ env RUSTFLAGS='--cfg curve25519_dalek_bits="32"' cargo build --no-default-features --target thumbv7em-none-eabi