Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add job building with no alloc feature #76

Merged
merged 3 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,23 @@ jobs:
command: test
args: --features ${{ matrix.backend }}

build_no_alloc:
name: build without alloc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup target add thumbv7em-none-eabihf
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
args: --target thumbv7em-none-eabihf --no-default-features

fmt:
name: Rustfmt
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ license = "MIT OR Apache-2.0"
[dependencies]
# no-alloc, no-std
cfg-if = "1.0"
hex = { version ="=0.4.2", default-features = false }
once_cell = { version= "1.8", default-features = false }
subtle = "2.5"
hex = { version ="=0.4.2", default-features = false }
subtle = { version="2.5", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false }
zeroize = { version = "1.7", default-features = false }
# no-std
Expand All @@ -32,14 +31,15 @@ ark-bls12-377 = { version = "0.4", optional = true }
ark-ed-on-bls12-377 = { version = "0.4", optional = true }
ark-groth16 = { version = "0.4", optional = true }
ark-snark = { version = "0.4", optional = true }
once_cell = { version= "1.8", optional = true, default-features = false }

# This matches what ark-std (a library for no_std compatibility) does, having
# a default feature of std - without the ark-std std feature, decaf377 doesn't
# compile
[features]
default = ["arkworks"]
alloc = ["once_cell/alloc", "tracing-subscriber/alloc", "zeroize/alloc"]
std = ["alloc", "tracing/std", "anyhow/std", "tracing-subscriber/std", "zeroize/std", "once_cell/std", "num-bigint/std", "hex/std"]
std = ["alloc", "tracing/std", "anyhow/std", "tracing-subscriber/std", "zeroize/std", "once_cell/std", "num-bigint/std", "hex/std", "subtle/std"]
parallel = ["ark-ff/parallel", "ark-ec/parallel", "ark-groth16/parallel", "ark-std/parallel", "ark-r1cs-std/parallel"]
# TODO: eventually, feature-gate all arkworks deps behind this feature.
arkworks = ["std", "ark-std", "ark-ec", "ark-ff", "ark-serialize", "ark-bls12-377", "ark-ed-on-bls12-377"]
Expand Down
Loading