From cf48db583c95b05dc20375ccd33b96c641ce8ca4 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/build_stable.yml | 40 ++++++++++++++++++++++++++++++ crates/bellman/Cargo.toml | 2 +- crates/fflonk/Cargo.toml | 2 +- crates/franklin-crypto/Cargo.toml | 2 +- 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build_stable.yml diff --git a/.github/workflows/build_stable.yml b/.github/workflows/build_stable.yml new file mode 100644 index 0000000..27c1646 --- /dev/null +++ b/.github/workflows/build_stable.yml @@ -0,0 +1,40 @@ +name: "Build stable" +on: + pull_request: + paths: + - "crates/**" + - "Cargo.toml" + - ".github/workflows/ci.yaml" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: "always" + CARGO_INCREMENTAL: "0" + RUSTC_WRAPPER: "sccache" + SCCACHE_GHA_ENABLED: "true" + +jobs: + 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"]