From 2ad8747914b62ded06c2a2172a12b18aa7901bf3 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Tue, 19 Mar 2024 09:59:01 +0100 Subject: [PATCH] Add no_std support --- .github/workflows/rust.yml | 12 + .gitignore | 1 + Cargo.lock | 10 +- Cargo.toml | 8 + givre/Cargo.toml | 7 +- givre/src/ciphersuite.rs | 3 + givre/src/ciphersuite/bitcoin.rs | 6 + givre/src/lib.rs | 3 + givre/src/signing/aggregate.rs | 3 + givre/src/signing/round2.rs | 3 + givre/src/signing/utils.rs | 2 + wasm/no_std/Cargo.lock | 477 +++++++++++++++++++++++++++++++ wasm/no_std/Cargo.toml | 13 + wasm/no_std/src/lib.rs | 8 + 14 files changed, 549 insertions(+), 7 deletions(-) create mode 100644 wasm/no_std/Cargo.lock create mode 100644 wasm/no_std/Cargo.toml create mode 100644 wasm/no_std/src/lib.rs diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e825ffa..2361e6a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,6 +27,18 @@ jobs: cache-on-failure: "true" - name: Build all-features run: cargo build -p givre --all-features + build-wasm-nostd: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: "true" + - name: Install wasm32-unknown-unknown toolchain + run: rustup target add wasm32-unknown-unknown + - name: Build on wasm32-unknown-unknown (no_std) + run: + (cd wasm/no_std && cargo build --target wasm32-unknown-unknown) test: runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index 02db9f8..75e2c55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target +/wasm/no_std/target /.helix diff --git a/Cargo.lock b/Cargo.lock index b32ed95..17c4c68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -473,9 +473,9 @@ dependencies = [ [[package]] name = "generic-ec" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f315ffeaae6a05691c5a27028b4ae960d3a430e406d0109ff8502e2f84ae97b" +checksum = "d12d7f94ce9093c96ba716c7f94c9c4f0858166cd8e74b617dfe1db6848ce7dd" dependencies = [ "generic-ec-core", "generic-ec-curves", @@ -705,9 +705,8 @@ dependencies = [ [[package]] name = "key-share" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c746d847a566beecf3927cd9dcb60a6c61ca7d24845d8025974a97fa011918" +version = "0.2.1" +source = "git+https://github.com/dfns/cggmp21?branch=no_std#979fda3d8272194ce47d5848e3d96c088ab67c1e" dependencies = [ "generic-ec", "generic-ec-zkp", @@ -716,7 +715,6 @@ dependencies = [ "serde", "serde_with", "slip-10", - "thiserror", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index c73fd9c..7ba2ceb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,11 @@ members = [ "givre", "tests", ] + +exclude = [ + "wasm/no_std", +] + +[patch.crates-io.key-share] +git = "https://github.com/dfns/cggmp21" +branch = "no_std" diff --git a/givre/Cargo.toml b/givre/Cargo.toml index 2a5cb49..86fa3d5 100644 --- a/givre/Cargo.toml +++ b/givre/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] cggmp21-keygen = { version = "0.1", optional = true } -key-share = "0.2" +key-share = { version = "0.2", default-features = false } generic-ec = { version = "0.2", default-features = false } @@ -27,6 +27,10 @@ serde = { version = "1", default-features = false, features = ["derive"], option rand_core = { version = "0.6", default-features = false, features = ["getrandom"] } [features] +default = ["std"] + +std = ["key-share/std"] + cggmp21-keygen = ["dep:cggmp21-keygen"] full-signing = ["round-based", "futures"] @@ -45,3 +49,4 @@ all-ciphersuites = ["ciphersuite-secp256k1", "ciphersuite-ed25519", "ciphersuite ciphersuite-secp256k1 = ["generic-ec/curve-secp256k1", "k256", "sha2", "static_assertions"] ciphersuite-ed25519 = ["generic-ec/curve-ed25519", "sha2"] ciphersuite-bitcoin = ["ciphersuite-secp256k1"] + diff --git a/givre/src/ciphersuite.rs b/givre/src/ciphersuite.rs index 5f7beef..29bc05c 100644 --- a/givre/src/ciphersuite.rs +++ b/givre/src/ciphersuite.rs @@ -6,6 +6,9 @@ //! * [Secp256k1], requires `ciphersuite-secp256k1` feature //! * [Ed25519], requires `ciphersuite-ed25519` feature //! * [Bitcoin], requires `ciphersuite-bitcoin` feature + +use alloc::vec::Vec; + use generic_ec::{ errors::{InvalidPoint, InvalidScalar}, Curve, NonZero, Point, Scalar, SecretScalar, diff --git a/givre/src/ciphersuite/bitcoin.rs b/givre/src/ciphersuite/bitcoin.rs index 8cb7516..8aaecd6 100644 --- a/givre/src/ciphersuite/bitcoin.rs +++ b/givre/src/ciphersuite/bitcoin.rs @@ -84,6 +84,7 @@ impl Ciphersuite for Bitcoin { } } +#[cfg(feature = "std")] fn challenge_hash() -> sha2::Sha256 { static PRECOMPUTED: std::sync::OnceLock = std::sync::OnceLock::new(); PRECOMPUTED @@ -93,3 +94,8 @@ fn challenge_hash() -> sha2::Sha256 { }) .clone() } +#[cfg(not(feature = "std"))] +fn challenge_hash() -> sha2::Sha256 { + let tag = sha2::Sha256::digest("BIP0340/challenge"); + sha2::Sha256::new().chain_update(&tag).chain_update(&tag) +} diff --git a/givre/src/lib.rs b/givre/src/lib.rs index b3f46c5..309dd7e 100644 --- a/givre/src/lib.rs +++ b/givre/src/lib.rs @@ -25,6 +25,9 @@ #![deny(missing_docs)] #![allow(clippy::type_complexity)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(not(feature = "std"), no_std)] + +extern crate alloc; pub use generic_ec; #[cfg(feature = "full-signing")] diff --git a/givre/src/signing/aggregate.rs b/givre/src/signing/aggregate.rs index c736267..bcd1952 100644 --- a/givre/src/signing/aggregate.rs +++ b/givre/src/signing/aggregate.rs @@ -6,6 +6,7 @@ //! //! [Section 5.3]: https://www.ietf.org/archive/id/draft-irtf-cfrg-frost-15.html#name-signature-share-aggregation +use alloc::vec::Vec; use core::fmt; use generic_ec::{NonZero, Point, Scalar}; @@ -125,6 +126,7 @@ impl fmt::Display for AggregateError { } } +#[cfg(feature = "std")] impl std::error::Error for AggregateError { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match &self.0 { @@ -143,4 +145,5 @@ impl fmt::Display for InvalidSignature { } } +#[cfg(feature = "std")] impl std::error::Error for InvalidSignature {} diff --git a/givre/src/signing/round2.rs b/givre/src/signing/round2.rs index 38571f3..18fd089 100644 --- a/givre/src/signing/round2.rs +++ b/givre/src/signing/round2.rs @@ -6,6 +6,7 @@ //! //! [Section 5.2]: https://www.ietf.org/archive/id/draft-irtf-cfrg-frost-15.html#name-round-two-signature-share-g +use alloc::vec::Vec; use core::{fmt, iter}; use generic_ec::{Curve, NonZero, Scalar}; @@ -239,6 +240,7 @@ impl fmt::Display for Bug { } } +#[cfg(feature = "std")] impl std::error::Error for SigningError { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match &self.0 { @@ -254,6 +256,7 @@ impl std::error::Error for SigningError { } } +#[cfg(feature = "std")] impl std::error::Error for Bug { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match self { diff --git a/givre/src/signing/utils.rs b/givre/src/signing/utils.rs index 4e3b665..8e0c006 100644 --- a/givre/src/signing/utils.rs +++ b/givre/src/signing/utils.rs @@ -1,3 +1,5 @@ +use alloc::vec::Vec; + use digest::{FixedOutput, Update}; use generic_ec::{Curve, NonZero, Point, Scalar}; diff --git a/wasm/no_std/Cargo.lock b/wasm/no_std/Cargo.lock new file mode 100644 index 0000000..54e4ae2 --- /dev/null +++ b/wasm/no_std/Cargo.lock @@ -0,0 +1,477 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "fiat-crypto", + "group", + "platforms", + "rand_core", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "educe" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "enum-ordinalize" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "generic-ec" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d12d7f94ce9093c96ba716c7f94c9c4f0858166cd8e74b617dfe1db6848ce7dd" +dependencies = [ + "generic-ec-core", + "generic-ec-curves", + "phantom-type", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "generic-ec-core" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cab102fc88bfc017c16e69d21edae6f41ab58bfe69eed09ed0a2cf10ec923f" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "generic-ec-curves" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a133d38cde4fef7aea4e367ca51f291db0248495a424ec4208cdace08ba59f4" +dependencies = [ + "crypto-bigint", + "curve25519-dalek", + "elliptic-curve", + "generic-ec-core", + "group", + "k256", + "rand_core", + "sha2", + "subtle", + "zeroize", +] + +[[package]] +name = "generic-ec-zkp" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9b631ea71fa0294e80d479c5b952e276776c9abf1b1a542b48e66b83fe1828c" +dependencies = [ + "generic-array", + "generic-ec", + "rand_core", + "subtle", +] + +[[package]] +name = "givre" +version = "0.1.0" +dependencies = [ + "digest", + "generic-ec", + "k256", + "key-share", + "rand_core", + "sha2", + "static_assertions", +] + +[[package]] +name = "givre-compiles-in-nostd-wasm" +version = "0.1.0" +dependencies = [ + "givre", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "elliptic-curve", +] + +[[package]] +name = "key-share" +version = "0.2.1" +source = "git+https://github.com/dfns/cggmp21?branch=no_std#979fda3d8272194ce47d5848e3d96c088ab67c1e" +dependencies = [ + "generic-ec", + "generic-ec-zkp", +] + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "phantom-type" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e68f5dc797c2a743e024e1c53215474598faf0408826a90249569ad7f47adeaa" +dependencies = [ + "educe", +] + +[[package]] +name = "platforms" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" + +[[package]] +name = "proc-macro2" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] diff --git a/wasm/no_std/Cargo.toml b/wasm/no_std/Cargo.toml new file mode 100644 index 0000000..d6a9d8e --- /dev/null +++ b/wasm/no_std/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "givre-compiles-in-nostd-wasm" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +givre = { path = "../../givre", default-features = false, features = ["all-ciphersuites"] } + +[patch.crates-io.key-share] +git = "https://github.com/dfns/cggmp21" +branch = "no_std" diff --git a/wasm/no_std/src/lib.rs b/wasm/no_std/src/lib.rs new file mode 100644 index 0000000..6b72e8b --- /dev/null +++ b/wasm/no_std/src/lib.rs @@ -0,0 +1,8 @@ +#![no_std] + +pub use givre::*; + +#[panic_handler] +fn panic(_panic: &core::panic::PanicInfo<'_>) -> ! { + loop {} +}