-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support no_std for ed25519-consensus.
This moves the `std::error::Error` impl for `Error` and the `batch` module behind the `std` feature flag.
- Loading branch information
1 parent
8c0007e
commit f42273e
Showing
9 changed files
with
81 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,64 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
|
||
on: [push] | ||
name: Continuous integration | ||
|
||
jobs: | ||
test_nightly: | ||
name: test on nightly | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
# Because we use nightly features for building docs, | ||
# using --all-features will fail without nightly toolchain. | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
|
||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
nostd: | ||
name: Build on no_std | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: thumbv7em-none-eabihf | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --no-default-features --target thumbv7em-none-eabihf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
#[cfg(feature = "std")] | ||
use thiserror::Error; | ||
|
||
/// An error related to Ed25519 signatures. | ||
#[derive(Error, Debug, Copy, Clone, Eq, PartialEq)] | ||
#[derive(Debug, Copy, Clone, Eq, PartialEq)] | ||
#[cfg_attr(feature = "std", derive(Error))] | ||
pub enum Error { | ||
/// The encoding of a secret key was malformed. | ||
#[error("Malformed secret key encoding.")] | ||
#[cfg_attr(feature = "std", error("Malformed secret key encoding."))] | ||
MalformedSecretKey, | ||
/// The encoding of a public key was malformed. | ||
#[error("Malformed public key encoding.")] | ||
#[cfg_attr(feature = "std", error("Malformed public key encoding."))] | ||
MalformedPublicKey, | ||
/// Signature verification failed. | ||
#[error("Invalid signature.")] | ||
#[cfg_attr(feature = "std", error("Invalid signature."))] | ||
InvalidSignature, | ||
/// A byte slice of the wrong length was supplied during parsing. | ||
#[error("Invalid length when parsing byte slice.")] | ||
#[cfg_attr(feature = "std", error("Invalid length when parsing byte slice."))] | ||
InvalidSliceLength, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters