Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion crates/rocksdb-cxx-linkage-fix/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::env;

pub fn configure() {
println!("cargo:rerun-if-env-changed=ROCKSDB_COMPILE");
println!("cargo:rerun-if-env-changed=ROCKSDB_LIB_DIR");
println!("cargo:rerun-if-env-changed=ROCKSDB_STATIC");
println!("cargo:rerun-if-env-changed=CXXSTDLIB");
let target = env::var("TARGET").unwrap_or_default();
Expand All @@ -18,8 +19,9 @@ fn should_link_cpp_stdlib() -> bool {
let rocksdb_compile = env::var("ROCKSDB_COMPILE").unwrap_or_default();
let rocksdb_compile_disabled = matches!(rocksdb_compile.as_str(), "0" | "false" | "FALSE");
let rocksdb_static = env::var("ROCKSDB_STATIC").is_ok();
let rocksdb_lib_dir_set = env::var("ROCKSDB_LIB_DIR").is_ok();

rocksdb_compile_disabled && rocksdb_static
rocksdb_lib_dir_set || (rocksdb_static && rocksdb_compile_disabled)
}

fn link_cpp_stdlib(target: &str) {
Expand Down
3 changes: 3 additions & 0 deletions crates/store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ tower-http = { features = ["util"], workspace = true }
tracing = { workspace = true }
url = { workspace = true }

[build-dependencies]
miden-node-rocksdb-cxx-linkage-fix = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true }
criterion = { version = "0.5" }
Expand Down
3 changes: 3 additions & 0 deletions crates/store/build.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// This build.rs is required to trigger the `diesel_migrations::embed_migrations!` proc-macro in
// `store/src/db/migrations.rs` to include the latest version of the migrations into the binary, see <https://docs.rs/diesel_migrations/latest/diesel_migrations/macro.embed_migrations.html#automatic-rebuilds>.

fn main() {
println!("cargo:rerun-if-changed=./src/db/migrations");
// If we do one re-write, the default rules are disabled,
// hence we need to trigger explicitly on `Cargo.toml`.
// <https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed>
println!("cargo:rerun-if-changed=Cargo.toml");

miden_node_rocksdb_cxx_linkage_fix::configure();
}
3 changes: 3 additions & 0 deletions crates/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@ tracing-opentelemetry = { version = "0.32" }
tracing-subscriber = { workspace = true }
url = { workspace = true }

[build-dependencies]
miden-node-rocksdb-cxx-linkage-fix = { workspace = true }

[dev-dependencies]
thiserror = { workspace = true }