Skip to content

Commit 8380c76

Browse files
committed
feat: add no-std feature to mina-curves crate
- Add `no-std` feature to Cargo.toml (not default) - Add conditional `#![no_std]` attribute to lib.rs - Enable mina-curves in no-std CI workflow Closes: o1-labs/mina-rust#1987
1 parent 28a9216 commit 8380c76

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.github/workflows/no-std.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
- { name: "mina-hasher", path: "hasher" } # https://github.com/o1-labs/mina-rust/issues/1994
2525
- { name: "mina-poseidon", path: "poseidon" } # https://github.com/o1-labs/mina-rust/issues/1996
2626
- { name: "mina-signer", path: "signer" } # https://github.com/o1-labs/mina-rust/issues/1995
27+
- { name: "mina-curves", path: "curves" } # https://github.com/o1-labs/mina-rust/issues/1987
2728
# TODO: Add no-std feature to these crates
2829
# - { name: "wasm-types", path: "crates/wasm-types" }
2930
# - { name: "groupmap", path: "groupmap" } # https://github.com/o1-labs/mina-rust/issues/1985
3031
# - { name: "turshi", path: "turshi" } # https://github.com/o1-labs/mina-rust/issues/1986
31-
# - { name: "mina-curves", path: "curves" } # https://github.com/o1-labs/mina-rust/issues/1987
3232
# - { name: "o1-utils", path: "utils" } # https://github.com/o1-labs/mina-rust/issues/1988
3333
# - { name: "internal-tracing", path: "internal-tracing" } # https://github.com/o1-labs/mina-rust/issues/1989
3434
# - { name: "poly-commitment", path: "poly-commitment" } # https://github.com/o1-labs/mina-rust/issues/1990

curves/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ default = ["asm"]
1414
# The MontConfig derive macro from ark_ff generates code with cfg(feature = "asm").
1515
# This feature enables assembly optimizations in ark_ff.
1616
asm = []
17+
no-std = []
1718

1819
[dependencies]
1920
ark-bn254.workspace = true

curves/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
#![cfg_attr(feature = "no-std", no_std)]
2+
13
pub mod named;
24
pub mod pasta;

0 commit comments

Comments
 (0)