From 5f2789fe377e4c7252bfc23bc9e682df2f55a806 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Tue, 12 Nov 2024 10:06:45 +0400 Subject: [PATCH] feat(bellman): Remove allocator feature from default features --- .github/workflows/ci.yaml | 22 ++++++++++++++++++++++ crates/bellman/Cargo.toml | 2 +- crates/fflonk/Cargo.toml | 2 +- crates/franklin-crypto/Cargo.toml | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3ff190a..d8c12d9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,3 +50,25 @@ jobs: - name: Run tests run: cargo nextest run --no-fail-fast + + build_stable: + name: Build (stable) + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + # Remove default `-D warnings`. This is a temporary measure. + rustflags: "" + + - name: Install sccache + uses: mozilla-actions/sccache-action@v0.0.4 + + # Bellman crate *must* build on stable, because parts of the core + # codebase are only used in the context of stable compiler. + - name: Build + run: | + cargo build -p zksync_bellman diff --git a/crates/bellman/Cargo.toml b/crates/bellman/Cargo.toml index 019042a..bd657de 100644 --- a/crates/bellman/Cargo.toml +++ b/crates/bellman/Cargo.toml @@ -35,7 +35,7 @@ lazy_static = { version = "1", optional = true } hex = "0.4" [features] -default = ["multicore", "plonk", "allocator"] +default = ["multicore", "plonk"] multicore = ["crossbeam", "futures/thread-pool"] sonic = ["tiny-keccak", "blake2-rfc"] gm17 = [] diff --git a/crates/fflonk/Cargo.toml b/crates/fflonk/Cargo.toml index 3f99d1d..c7f2ac3 100644 --- a/crates/fflonk/Cargo.toml +++ b/crates/fflonk/Cargo.toml @@ -11,7 +11,7 @@ categories.workspace = true description = "Reference implementation of fflonk prover and verifier" [dependencies] -franklin-crypto.workspace = true +franklin-crypto = { workspace = true, features = ["allocator"] } num-bigint = { version = "0.4", features = ["serde"] } num-traits = "0.2" rand = "0.4" diff --git a/crates/franklin-crypto/Cargo.toml b/crates/franklin-crypto/Cargo.toml index 29f2c29..917d941 100644 --- a/crates/franklin-crypto/Cargo.toml +++ b/crates/franklin-crypto/Cargo.toml @@ -14,7 +14,7 @@ description = "Cryptographic library for SNARK gadgets, based on sapling-crypto" crate-type = ["lib", "staticlib"] [features] -default = ["multicore", "plonk", "allocator"] +default = ["multicore", "plonk"] multicore = ["bellman/multicore"] plonk = ["bellman/plonk"] allocator = ["bellman/allocator"]