Merge pull request #27 from huitseeker/curve2559_backends
Pass-through x,curve2559 backends
This commit is contained in:
+51
-14
@@ -5,8 +5,57 @@ on:
|
|||||||
types: [opened, repoened, synchronize]
|
types: [opened, repoened, synchronize]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
combo:
|
test:
|
||||||
name: test + Clippy + rustfmt
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
backend_feature:
|
||||||
|
- u64_backend
|
||||||
|
- u32_backend
|
||||||
|
name: test
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install nightly toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Run cargo test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --no-default-features --features ${{ matrix.backend_feature }}
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: cargo clippy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install nightly toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: nightly
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Run cargo clippy
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: -- -D warnings
|
||||||
|
|
||||||
|
|
||||||
|
format:
|
||||||
|
name: cargo fmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
@@ -26,18 +75,6 @@ jobs:
|
|||||||
command: fmt
|
command: fmt
|
||||||
args: --all -- --check
|
args: --all -- --check
|
||||||
|
|
||||||
- name: Run cargo clippy
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: clippy
|
|
||||||
args: --all-features -- -D warnings
|
|
||||||
|
|
||||||
- name: Run cargo test
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --all-features
|
|
||||||
|
|
||||||
deny-check:
|
deny-check:
|
||||||
name: cargo-deny check
|
name: cargo-deny check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
+5
-3
@@ -10,13 +10,15 @@ edition = "2018"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = ["u64_backend"]
|
||||||
slow-hash = ["scrypt"]
|
slow-hash = ["scrypt"]
|
||||||
bench = []
|
bench = []
|
||||||
|
u64_backend = ["curve25519-dalek/u64_backend", "x25519-dalek/u64_backend"]
|
||||||
|
u32_backend = ["curve25519-dalek/u32_backend", "x25519-dalek/u32_backend"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
aead = "0.3.1"
|
aead = "0.3.1"
|
||||||
curve25519-dalek = "2.1.0"
|
curve25519-dalek = { version = "2.1.0", default-features = false, features = ["std"]}
|
||||||
displaydoc = "0.1"
|
displaydoc = "0.1"
|
||||||
generic-array = "0.14.2"
|
generic-array = "0.14.2"
|
||||||
hkdf = "0.9.0-alpha.0"
|
hkdf = "0.9.0-alpha.0"
|
||||||
@@ -25,7 +27,7 @@ rand_core = "0.5.1"
|
|||||||
scrypt = { version = "0.3.0", optional = true }
|
scrypt = { version = "0.3.0", optional = true }
|
||||||
sha2 = "0.9.0"
|
sha2 = "0.9.0"
|
||||||
thiserror = "1.0.19"
|
thiserror = "1.0.19"
|
||||||
x25519-dalek = "0.6.0"
|
x25519-dalek = { version = "0.6.0", default-features = false, features = ["std"]}
|
||||||
zeroize = "1.1"
|
zeroize = "1.1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|||||||
@@ -386,6 +386,12 @@
|
|||||||
#![cfg_attr(not(feature = "bench"), deny(missing_docs))]
|
#![cfg_attr(not(feature = "bench"), deny(missing_docs))]
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
|
|
||||||
|
#[cfg(not(any(feature = "u64_backend", feature = "u32_backend",)))]
|
||||||
|
compile_error!(
|
||||||
|
"no dalek arithmetic backend cargo feature enabled! \
|
||||||
|
please enable one of: u64_backend, u32_backend"
|
||||||
|
);
|
||||||
|
|
||||||
// Error types
|
// Error types
|
||||||
pub mod errors;
|
pub mod errors;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user