mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
Add no_std support to transcript, dalek-ff-group, ed448, ciphersuite, multiexp, schnorr, and monero-generators
transcript, dalek-ff-group, ed449, and ciphersuite are all usable with no_std alone. The rest additionally require alloc. Part of #279.
This commit is contained in:
33
tests/no-std/Cargo.toml
Normal file
33
tests/no-std/Cargo.toml
Normal file
@@ -0,0 +1,33 @@
|
||||
[package]
|
||||
name = "serai-no-std"
|
||||
version = "0.1.0"
|
||||
description = "A crate to test no-std builds of Serai crates work"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/kayabaNerve/serai/tree/develop/common/std-shims"
|
||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||
keywords = ["nostd", "no_std", "alloc", "io"]
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[dependencies]
|
||||
flexible-transcript = { path = "../../crypto/transcript", features = ["recommended", "merlin"] }
|
||||
|
||||
dalek-ff-group = { path = "../../crypto/dalek-ff-group" }
|
||||
minimal-ed448 = { path = "../../crypto/ed448" }
|
||||
|
||||
ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, features = ["alloc", "secp256k1", "p256", "ed25519", "ristretto", "ed448"] }
|
||||
|
||||
multiexp = { path = "../../crypto/multiexp", default-features = false, features = ["batch"] }
|
||||
|
||||
# dleq = { path = "../../crypto/dleq" }
|
||||
schnorr-signatures = { path = "../../crypto/schnorr", default-features = false }
|
||||
|
||||
# dkg = { path = "../../crypto/dkg" }
|
||||
# modular-frost = { path = "../../crypto/frost" }
|
||||
# frost-schnorrkel = { path = "../../crypto/schnorrkel" }
|
||||
|
||||
monero-generators = { path = "../../coins/monero/generators", default-features = false, features = ["alloc"] }
|
||||
21
tests/no-std/LICENSE
Normal file
21
tests/no-std/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Luke Parker
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
3
tests/no-std/README.md
Normal file
3
tests/no-std/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# no-std tests
|
||||
|
||||
A crate usable to test building various Serai crates in a no-std environment.
|
||||
26
tests/no-std/src/lib.rs
Normal file
26
tests/no-std/src/lib.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
#![no_std]
|
||||
|
||||
pub use flexible_transcript::*;
|
||||
|
||||
pub mod dalek {
|
||||
pub use dalek_ff_group::*;
|
||||
}
|
||||
pub mod ed448 {
|
||||
pub use minimal_ed448::*;
|
||||
}
|
||||
|
||||
pub use ciphersuite::*;
|
||||
|
||||
pub use multiexp::*;
|
||||
|
||||
// pub use dleq::*;
|
||||
pub use schnorr_signatures::*;
|
||||
|
||||
/*
|
||||
pub use dkg::*;
|
||||
pub use modular_frost::*;
|
||||
pub use frost_schnorrkel::*;
|
||||
*/
|
||||
|
||||
pub use monero_generators::*;
|
||||
// pub use monero_serai::*;
|
||||
Reference in New Issue
Block a user