Skip to content

Commit

Permalink
fix(native_blockifier): activate testing feature only in dev dependen…
Browse files Browse the repository at this point in the history
…cies
  • Loading branch information
dorimedini-starkware committed Dec 10, 2024
1 parent 841ad08 commit 87f762c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions crates/native_blockifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description = "A Bridge between the Rust blockifier crate and Python."
# On Python, make sure to compile this with the extension-module feature enabled.
# https://pyo3.rs/v0.19.1/faq#i-cant-run-cargo-test-or-i-cant-build-in-a-cargo-workspace-im-having-linker-issues-like-symbol-not-found-or-undefined-reference-to-_pyexc_systemerror
extension-module = ["pyo3/extension-module"]
testing = []
testing = ["blockifier/testing", "papyrus_storage/testing", "starknet_api/testing"]

[lints]
workspace = true
Expand All @@ -27,23 +27,26 @@ crate-type = ["cdylib"]

[dependencies]
# TODO(Dori, 1/1/2025): Add the "jemalloc" feature to the blockifier crate when possible.
blockifier = { workspace = true, features = ["cairo_native", "testing"] }
blockifier = { workspace = true, features = ["cairo_native"] }
cairo-lang-starknet-classes.workspace = true
cairo-vm.workspace = true
indexmap.workspace = true
log.workspace = true
num-bigint.workspace = true
papyrus_state_reader.workspace = true
papyrus_storage = { workspace = true, features = ["testing"] }
papyrus_storage.workspace = true
pyo3 = { workspace = true, features = ["hashbrown", "num-bigint"] }
pyo3-log.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true, features = ["arbitrary_precision"] }
starknet-types-core.workspace = true
starknet_api = { workspace = true, features = ["testing"] }
starknet_api.workspace = true
thiserror.workspace = true

[dev-dependencies]
blockifier = { workspace = true, features = ["cairo_native", "testing"] }
cached.workspace = true
papyrus_storage = { workspace = true, features = ["testing"] }
pretty_assertions.workspace = true
starknet_api = { workspace = true, features = ["testing"] }
tempfile.workspace = true
2 changes: 1 addition & 1 deletion scripts/build_native_blockifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function build() {
echo "Building..."
pypy3.9 -m venv /tmp/venv
source /tmp/venv/bin/activate
cargo build --release -p native_blockifier --features "testing" || clean
cargo build --release -p native_blockifier || clean
clean
}

Expand Down

0 comments on commit 87f762c

Please sign in to comment.