From 82eee6ab08ae480f04904ca8571fd88f4466c000 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 26 Apr 2023 20:53:21 +0100 Subject: [PATCH] fix: prevent `bn254` feature flag always being enabled (#225) * fix: prevent bn254 feature flag always being enabled * chore: misc `Cargo.toml` cleanup --- Cargo.toml | 6 +++--- acir_field/Cargo.toml | 4 ++-- acvm/Cargo.toml | 4 ++-- stdlib/Cargo.toml | 15 +++++++++++---- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 943f4cdd8..e0945e5fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,14 +3,14 @@ members = ["acir_field", "acir", "acvm", "stdlib"] [workspace.package] -authors = ["The Noir Team "] +authors = ["The Noir Team "] edition = "2021" license = "MIT" rust-version = "1.66" [workspace.dependencies] acir = { version = "0.9.0", path = "acir" } -acir_field = { version = "0.9.0", path = "acir_field" } +acir_field = { version = "0.9.0", path = "acir_field", default-features = false } stdlib = { package = "acvm_stdlib", version = "0.9.0", path = "stdlib" } hex = "0.4.2" @@ -19,4 +19,4 @@ num-traits = "0.2" blake2 = "0.9.1" -serde = { version = "1.0.136", features = ["derive"] } \ No newline at end of file +serde = { version = "1.0.136", features = ["derive"] } diff --git a/acir_field/Cargo.toml b/acir_field/Cargo.toml index 2dae43790..e8836c30a 100644 --- a/acir_field/Cargo.toml +++ b/acir_field/Cargo.toml @@ -27,5 +27,5 @@ cfg-if = "1.0.0" [features] default = ["bn254"] -bn254 = ["ark-bn254", "ark-ff"] -bls12_381 = ["ark-bls12-381", "ark-ff"] +bn254 = ["dep:ark-bn254", "dep:ark-ff"] +bls12_381 = ["dep:ark-bls12-381", "dep:ark-ff"] diff --git a/acvm/Cargo.toml b/acvm/Cargo.toml index 49ba23cce..ee66ea86f 100644 --- a/acvm/Cargo.toml +++ b/acvm/Cargo.toml @@ -30,8 +30,8 @@ indexmap = "1.7.0" thiserror = "1.0.21" [features] -bn254 = ["acir/bn254"] -bls12_381 = ["acir/bls12_381"] +bn254 = ["acir/bn254", "stdlib/bn254"] +bls12_381 = ["acir/bls12_381", "stdlib/bls12_381"] [dev-dependencies] rand = "0.8.5" diff --git a/stdlib/Cargo.toml b/stdlib/Cargo.toml index 13d0cd1f4..f25e7cd6f 100644 --- a/stdlib/Cargo.toml +++ b/stdlib/Cargo.toml @@ -1,10 +1,17 @@ [package] name = "acvm_stdlib" -version = "0.9.0" -edition = "2021" -license = "MIT" description = "The ACVM standard library." +version = "0.9.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +rust-version.workspace = true + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -acir = { version = "0.9.0", path = "../acir", features = ["bn254"] } +acir.workspace = true + +[features] +bn254 = ["acir/bn254"] +bls12_381 = ["acir/bls12_381"]