Skip to content

Commit

Permalink
feat(native_blockifier): make cairo_native a feature of native blocki…
Browse files Browse the repository at this point in the history
…fier (#2625)
  • Loading branch information
dorimedini-starkware authored Dec 16, 2024
1 parent 135ea93 commit 3f75d13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions crates/native_blockifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ license-file.workspace = true
description = "A Bridge between the Rust blockifier crate and Python."

[features]
cairo_native = ["blockifier/cairo_native"]
# Required for `cargo test` to work with Pyo3.
# 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
Expand All @@ -27,7 +28,7 @@ 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", "native_blockifier"] }
blockifier = { workspace = true, features = ["native_blockifier"] }
cairo-lang-starknet-classes.workspace = true
cairo-vm.workspace = true
indexmap.workspace = true
Expand All @@ -44,7 +45,7 @@ starknet_api.workspace = true
thiserror.workspace = true

[dev-dependencies]
blockifier = { workspace = true, features = ["cairo_native", "native_blockifier", "testing"] }
blockifier = { workspace = true, features = ["native_blockifier", "testing"] }
cached.workspace = true
papyrus_storage = { workspace = true, features = ["testing"] }
pretty_assertions.workspace = true
Expand Down
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 || clean
cargo build --release -p native_blockifier --features "cairo_native" || clean
clean
}

Expand Down

0 comments on commit 3f75d13

Please sign in to comment.