Expose std_shims::io on core

The `io::Write` trait is somewhat worthless, being implemented for nothing, yet
`Read` remains fully functional. This also allows using its polyfills _without_
requiring `alloc`.

Opportunity taken to make `schnorr-signatures` not require `alloc`.

This will require a version bump before being published due to newly requiring
the `alloc` feature be specified to maintain pre-existing behavior.

Enables resolving https://github.com/monero-oxide/monero-oxide/issues/48.
This commit is contained in:
Luke Parker
2025-09-15 21:21:30 -04:00
parent 3bd48974f3
commit 95909d83a4
17 changed files with 168 additions and 78 deletions

View File

@@ -17,6 +17,8 @@ rustdoc-args = ["--cfg", "docsrs"]
workspace = true
[dependencies]
std-shims = { path = "../../common/std-shims", default-features = false }
flexible-transcript = { path = "../../crypto/transcript", default-features = false, features = ["recommended", "merlin"] }
multiexp = { path = "../../crypto/multiexp", default-features = false, features = ["batch"], optional = true }
@@ -26,7 +28,7 @@ minimal-ed448 = { path = "../../crypto/ed448", default-features = false }
ciphersuite = { path = "../../crypto/ciphersuite", default-features = false }
schnorr-signatures = { path = "../../crypto/schnorr", default-features = false, optional = true }
schnorr-signatures = { path = "../../crypto/schnorr", default-features = false }
prime-field = { path = "../../crypto/prime-field", default-features = false }
short-weierstrass = { path = "../../crypto/short-weierstrass", default-features = false }
@@ -42,6 +44,8 @@ bitcoin-serai = { path = "../../networks/bitcoin", default-features = false, fea
[features]
alloc = [
"std-shims/alloc",
"multiexp",
"dalek-ff-group/alloc",
@@ -49,7 +53,7 @@ alloc = [
"ciphersuite/alloc",
"schnorr-signatures",
"schnorr-signatures/alloc",
"prime-field/alloc",
"short-weierstrass/alloc",

View File

@@ -1,5 +1,7 @@
#![no_std]
pub use std_shims;
pub use flexible_transcript;
pub use dalek_ff_group;
@@ -11,18 +13,20 @@ pub use prime_field;
pub use short_weierstrass;
pub use secq256k1;
pub use embedwards25519;
/*
pub use modular_frost;
pub use frost_schnorrkel;
*/
pub use schnorr_signatures;
#[cfg(feature = "alloc")]
pub mod alloc {
pub use multiexp;
pub use schnorr_signatures;
pub use dkg;
pub use dkg_evrf;
pub use bitcoin_serai;
/*
pub use modular_frost;
pub use frost_schnorrkel;
*/
}