Make ethereum-schnorr-contract no-std and no-alloc eligible

This commit is contained in:
Luke Parker
2025-11-13 05:44:52 -05:00
parent 5662beeb8a
commit a793aa18ef
6 changed files with 21 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
#![doc = include_str!("../README.md")]
#![deny(missing_docs)]
#![allow(non_snake_case)]
#![cfg_attr(not(feature = "std"), no_std)]
mod public_key;
pub use public_key::PublicKey;

View File

@@ -1,4 +1,4 @@
use std::io;
use std_shims::io;
use sha3::{Digest, Keccak256};
@@ -77,6 +77,7 @@ impl Signature {
}
/// Write the signature.
#[cfg(feature = "alloc")]
pub fn write(&self, writer: &mut impl io::Write) -> io::Result<()> {
writer.write_all(&self.to_bytes())
}