diff --git a/Cargo.lock b/Cargo.lock index c321eac77fcb..9ed141fcb456 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3184,6 +3184,7 @@ dependencies = [ "prost", "prost-build", "protoc-prebuilt", + "re_build_tools", "rerun", ] @@ -3844,8 +3845,8 @@ dependencies = [ "crossbeam", "directories-next", "once_cell", - "re_build_build_info", "re_build_info", + "re_build_tools", "re_log", "serde", "serde_json", @@ -3886,7 +3887,11 @@ dependencies = [ ] [[package]] -name = "re_build_build_info" +name = "re_build_info" +version = "0.7.0-alpha.0" + +[[package]] +name = "re_build_tools" version = "0.7.0-alpha.0" dependencies = [ "anyhow", @@ -3895,10 +3900,6 @@ dependencies = [ "time", ] -[[package]] -name = "re_build_info" -version = "0.7.0-alpha.0" - [[package]] name = "re_build_web_viewer" version = "0.7.0-alpha.0" @@ -4171,6 +4172,7 @@ dependencies = [ "pathdiff", "pollster", "rand", + "re_build_tools", "re_error", "re_log", "re_tracing", @@ -4206,7 +4208,7 @@ dependencies = [ "once_cell", "parking_lot 0.12.1", "rand", - "re_build_build_info", + "re_build_tools", "re_components", "re_log", "re_log_encoding", @@ -4444,8 +4446,8 @@ dependencies = [ "puffin_http", "re_analytics", "re_arrow_store", - "re_build_build_info", "re_build_info", + "re_build_tools", "re_components", "re_data_store", "re_data_ui", @@ -4560,7 +4562,7 @@ dependencies = [ "futures-util", "hyper", "re_analytics", - "re_build_build_info", + "re_build_tools", "re_build_web_viewer", "re_error", "re_log", @@ -4658,8 +4660,8 @@ dependencies = [ "puffin", "rayon", "re_analytics", - "re_build_build_info", "re_build_info", + "re_build_tools", "re_crash_handler", "re_data_store", "re_format", @@ -4684,8 +4686,8 @@ dependencies = [ "anyhow", "document-features", "mimalloc", - "re_build_build_info", "re_build_info", + "re_build_tools", "re_log", "re_memory", "rerun", @@ -4707,8 +4709,8 @@ dependencies = [ "pyo3", "pyo3-build-config", "rand", - "re_build_build_info", "re_build_info", + "re_build_tools", "re_components", "re_error", "re_log", diff --git a/Cargo.toml b/Cargo.toml index 4c4af6135e46..e8a808583e87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,8 +25,8 @@ version = "0.7.0-alpha.0" # re_log_types 0.3.0-alpha.0, NOT 0.3.0-alpha.4 even though it is newer and semver-compatible. re_analytics = { path = "crates/re_analytics", version = "0.7.0-alpha.0", default-features = false } re_arrow_store = { path = "crates/re_arrow_store", version = "0.7.0-alpha.0", default-features = false } -re_build_build_info = { path = "crates/re_build_build_info", version = "0.7.0-alpha.0", default-features = false } re_build_info = { path = "crates/re_build_info", version = "0.7.0-alpha.0", default-features = false } +re_build_tools = { path = "crates/re_build_tools", version = "0.7.0-alpha.0", default-features = false } re_build_web_viewer = { path = "crates/re_build_web_viewer", version = "0.7.0-alpha.0", default-features = false } re_components = { path = "crates/re_components", version = "0.7.0-alpha.0", default-features = false } re_crash_handler = { path = "crates/re_crash_handler", version = "0.7.0-alpha.0", default-features = false } diff --git a/crates/re_analytics/Cargo.toml b/crates/re_analytics/Cargo.toml index dc8e8b440150..8a6c36ff8759 100644 --- a/crates/re_analytics/Cargo.toml +++ b/crates/re_analytics/Cargo.toml @@ -43,4 +43,4 @@ web-sys = { version = "0.3.58", features = ["Storage"] } [build-dependencies] -re_build_build_info.workspace = true +re_build_tools.workspace = true diff --git a/crates/re_analytics/build.rs b/crates/re_analytics/build.rs index 08c6a90adbd5..dbfbac611d3d 100644 --- a/crates/re_analytics/build.rs +++ b/crates/re_analytics/build.rs @@ -1,4 +1,4 @@ fn main() { - re_build_build_info::rebuild_if_crate_changed("re_analytics"); - re_build_build_info::export_env_vars(); + re_build_tools::rebuild_if_crate_changed("re_analytics"); + re_build_tools::export_env_vars(); } diff --git a/crates/re_build_info/Cargo.toml b/crates/re_build_info/Cargo.toml index 03d28059ed0d..3f56de4dd739 100644 --- a/crates/re_build_info/Cargo.toml +++ b/crates/re_build_info/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "re_build_info" authors.workspace = true -description = "Information about the build. Use together with re_build_build_info" +description = "Information about the build. Use together with re_build_tools" edition.workspace = true homepage.workspace = true include.workspace = true diff --git a/crates/re_build_info/src/lib.rs b/crates/re_build_info/src/lib.rs index 484289120cda..42501cd64243 100644 --- a/crates/re_build_info/src/lib.rs +++ b/crates/re_build_info/src/lib.rs @@ -1,6 +1,6 @@ //! Information about the build of a Rust crate. //! -//! To use this you also need to call `re_build_build_info::export_env_vars()` from your build.rs. +//! To use this you also need to call `re_build_tools::export_env_vars()` from your build.rs. mod build_info; mod crate_version; @@ -9,7 +9,7 @@ pub use build_info::BuildInfo; pub use crate_version::CrateVersion; /// Create a [`BuildInfo`] at compile-time using environment variables exported by -/// calling `re_build_build_info::export_env_vars()` from your build.rs. +/// calling `re_build_tools::export_env_vars()` from your build.rs. #[macro_export] macro_rules! build_info { () => { diff --git a/crates/re_build_build_info/Cargo.toml b/crates/re_build_tools/Cargo.toml similarity index 94% rename from crates/re_build_build_info/Cargo.toml rename to crates/re_build_tools/Cargo.toml index 474d1ebd9951..bf439458fb7f 100644 --- a/crates/re_build_build_info/Cargo.toml +++ b/crates/re_build_tools/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "re_build_build_info" +name = "re_build_tools" authors.workspace = true description = "build.rs helpers for generating build info" edition.workspace = true diff --git a/crates/re_build_build_info/README.md b/crates/re_build_tools/README.md similarity index 57% rename from crates/re_build_build_info/README.md rename to crates/re_build_tools/README.md index 56548b0d2689..8e4d09a5ed6b 100644 --- a/crates/re_build_build_info/README.md +++ b/crates/re_build_tools/README.md @@ -1,9 +1,9 @@ -# re_build_build_info +# re_build_tools Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates. -[![Latest version](https://img.shields.io/crates/v/re_build_build_info.svg)](https://crates.io/crates/re_build_build_info) -[![Documentation](https://docs.rs/re_build_build_info/badge.svg)](https://docs.rs/re_build_build_info) +[![Latest version](https://img.shields.io/crates/v/re_build_tools.svg)](https://crates.io/crates/re_build_tools) +[![Documentation](https://docs.rs/re_build_tools/badge.svg)](https://docs.rs/re_build_tools) ![MIT](https://img.shields.io/badge/license-MIT-blue.svg) ![Apache](https://img.shields.io/badge/license-Apache-blue.svg) diff --git a/crates/re_build_build_info/src/lib.rs b/crates/re_build_tools/src/lib.rs similarity index 93% rename from crates/re_build_build_info/src/lib.rs rename to crates/re_build_tools/src/lib.rs index d8c03d3b79be..487ea8ae9adb 100644 --- a/crates/re_build_build_info/src/lib.rs +++ b/crates/re_build_tools/src/lib.rs @@ -10,7 +10,10 @@ use std::process::Command; mod rebuild_detector; -pub use rebuild_detector::rebuild_if_crate_changed; +pub use rebuild_detector::{ + get_and_track_env_var, is_tracked_env_var_set, rebuild_if_crate_changed, rerun_if_changed, + rerun_if_changed_glob, rerun_if_changed_or_doesnt_exist, write_file_if_necessary, +}; // Situations to consider // ---------------------- @@ -74,22 +77,13 @@ pub fn export_env_vars() { if let Ok(head) = std::fs::read_to_string(&head_path) { if let Some(git_file) = head.strip_prefix("ref: ") { if let Ok(path) = git_path(git_file) { - rerun_if_changed(&path); // Track changes to commit hash + rerun_if_changed(path); // Track changes to commit hash } } } } } -fn rerun_if_changed(path: &str) { - // Make sure the file exists, otherwise we'll be rebuilding all the time. - assert!( - std::path::Path::new(path).exists(), - "Failed to find {path:?}" - ); - println!("cargo:rerun-if-changed={path}"); -} - fn set_env(name: &str, value: &str) { println!("cargo:rustc-env={name}={value}"); } diff --git a/crates/re_build_build_info/src/rebuild_detector.rs b/crates/re_build_tools/src/rebuild_detector.rs similarity index 68% rename from crates/re_build_build_info/src/rebuild_detector.rs rename to crates/re_build_tools/src/rebuild_detector.rs index 18ed80a09553..102b09ced200 100644 --- a/crates/re_build_build_info/src/rebuild_detector.rs +++ b/crates/re_build_tools/src/rebuild_detector.rs @@ -2,7 +2,7 @@ use std::{ collections::{HashMap, HashSet}, - path::PathBuf, + path::{Path, PathBuf}, }; use cargo_metadata::{CargoOpt, Metadata, MetadataCommand, Package, PackageId}; @@ -38,34 +38,71 @@ pub fn rebuild_if_crate_changed(pkg_name: &str) { } } -fn get_and_track_env_var(env_var_name: &str) -> Result { +/// Call from `build.rs` to trigger a rebuild whenever an environment variable changes. +pub fn get_and_track_env_var(env_var_name: &str) -> Result { println!("cargo:rerun-if-env-changed={env_var_name}"); std::env::var(env_var_name) } -fn is_tracked_env_var_set(env_var_name: &str) -> bool { +/// Call from `build.rs` to trigger a rebuild whenever an environment variable changes, and returns +/// true if that variable has been set to a truthy value. +pub fn is_tracked_env_var_set(env_var_name: &str) -> bool { let var = get_and_track_env_var(env_var_name).map(|v| v.to_lowercase()); var == Ok("1".to_owned()) || var == Ok("yes".to_owned()) || var == Ok("true".to_owned()) } -fn rerun_if_changed(path: &std::path::Path) { +/// Call from `build.rs` to trigger a rebuild whenever the file at `path` changes. +/// +/// This requires the file to exist, which may or may not be what you want! +pub fn rerun_if_changed(path: impl AsRef) { + let path = path.as_ref(); // Make sure the file exists, otherwise we'll be rebuilding all the time. assert!(path.exists(), "Failed to find {path:?}"); println!("cargo:rerun-if-changed={}", path.to_str().unwrap()); } -fn rerun_if_changed_glob(path: &str, files_to_watch: &mut HashSet) { +/// Call from `build.rs` to trigger a rebuild whenever the file at `path` changes, or it doesn't +/// exist. +pub fn rerun_if_changed_or_doesnt_exist(path: impl AsRef) { + let path = path.as_ref(); + println!("cargo:rerun-if-changed={}", path.to_str().unwrap()); +} + +/// Call from `build.rs` to trigger a rebuild whenever any of the files identified by the given +/// globbed `path` change. +pub fn rerun_if_changed_glob(path: impl AsRef, files_to_watch: &mut HashSet) { + let path = path.as_ref(); + // Workaround for windows verbatim paths not working with glob. // Issue: https://github.com/rust-lang/glob/issues/111 // Fix: https://github.com/rust-lang/glob/pull/112 // Fixed on upstream, but no release containing the fix as of writing. - let path = path.trim_start_matches(r"\\?\"); + let path = path.to_str().unwrap().trim_start_matches(r"\\?\"); for path in glob::glob(path).unwrap() { files_to_watch.insert(path.unwrap()); } } +/// Writes `content` to a file iff it differs from what's already there. +/// +/// This prevents recursive feedback loops where one generates source files from build.rs, which in +/// turn triggers `cargo`'s implicit `rerun-if-changed=src/**` clause. +// +// TODO(cmc): use the same source tracking system as re_types* instead +pub fn write_file_if_necessary( + path: impl AsRef, + content: &[u8], +) -> std::io::Result<()> { + if let Ok(cur_bytes) = std::fs::read(&path) { + if cur_bytes == content { + return Ok(()); + } + } + + std::fs::write(path, content) +} + // --- struct Packages<'a> { @@ -102,9 +139,9 @@ impl<'a> Packages<'a> { // NOTE: Since we track the cargo manifest, past this point we only need to // account for locally patched dependencies. - rerun_if_changed_glob(path.join("Cargo.toml").as_ref(), files_to_watch); - rerun_if_changed_glob(path.join("**/*.rs").as_ref(), files_to_watch); - rerun_if_changed_glob(path.join("**/*.wgsl").as_ref(), files_to_watch); + rerun_if_changed_glob(path.join("Cargo.toml"), files_to_watch); + rerun_if_changed_glob(path.join("**/*.rs"), files_to_watch); + rerun_if_changed_glob(path.join("**/*.wgsl"), files_to_watch); } // Track all direct and indirect dependencies of that root package @@ -133,8 +170,8 @@ impl<'a> Packages<'a> { let mut dep_path = dep_pkg.manifest_path.clone(); dep_path.pop(); - rerun_if_changed_glob(dep_path.join("Cargo.toml").as_ref(), files_to_watch); // manifest too! - rerun_if_changed_glob(dep_path.join("**/*.rs").as_ref(), files_to_watch); + rerun_if_changed_glob(dep_path.join("Cargo.toml"), files_to_watch); // manifest too! + rerun_if_changed_glob(dep_path.join("**/*.rs"), files_to_watch); } if tracked.insert(dep_pkg.id.clone()) { diff --git a/crates/re_renderer/Cargo.toml b/crates/re_renderer/Cargo.toml index 60978dbaa666..88a9c4bce12c 100644 --- a/crates/re_renderer/Cargo.toml +++ b/crates/re_renderer/Cargo.toml @@ -116,6 +116,11 @@ web-sys = { version = "0.3.61", features = [ # For build.rs: [build-dependencies] + +# Rerun +re_build_tools.workspace = true + +# External anyhow.workspace = true clean-path = "0.2" pathdiff = "0.2" diff --git a/crates/re_renderer/build.rs b/crates/re_renderer/build.rs index ee073b440cf3..1e4e2f4aaed3 100644 --- a/crates/re_renderer/build.rs +++ b/crates/re_renderer/build.rs @@ -14,24 +14,15 @@ #![allow(clippy::unwrap_used)] -use std::path::Path; +use std::path::{Path, PathBuf}; +use anyhow::{bail, ensure, Context as _}; use walkdir::{DirEntry, WalkDir}; -// --- - -fn rerun_if_changed(path: &std::path::Path) { - // Make sure the file exists, otherwise we'll be rebuilding all the time. - assert!(path.exists(), "Failed to find {path:?}"); - println!("cargo:rerun-if-changed={}", path.to_str().unwrap()); -} +use re_build_tools::{is_tracked_env_var_set, rerun_if_changed, write_file_if_necessary}; // --- -use std::path::PathBuf; - -use anyhow::{bail, ensure, Context as _}; - /// A pre-parsed import clause, as in `#import `. #[derive(Clone, Debug, PartialEq, Eq)] pub struct ImportClause { @@ -118,11 +109,11 @@ fn main() { // repository. return; } - if std::env::var("IS_IN_RERUN_WORKSPACE") != Ok("yes".to_owned()) { + if !is_tracked_env_var_set("IS_IN_RERUN_WORKSPACE") { // Only run if we are in the rerun workspace, not on users machines. return; } - if std::env::var("RERUN_IS_PUBLISHING") == Ok("yes".to_owned()) { + if is_tracked_env_var_set("RERUN_IS_PUBLISHING") { // We don't need to rebuild - we should have done so beforehand! // See `RELEASES.md` return; @@ -241,17 +232,3 @@ pub fn init() { write_file_if_necessary(file_path, contents.as_bytes()).unwrap(); } - -/// Only touch the file if the contents has actually changed -fn write_file_if_necessary( - dst_path: impl AsRef, - content: &[u8], -) -> std::io::Result<()> { - if let Ok(cur_bytes) = std::fs::read(&dst_path) { - if cur_bytes == content { - return Ok(()); - } - } - - std::fs::write(dst_path, content) -} diff --git a/crates/re_sdk/Cargo.toml b/crates/re_sdk/Cargo.toml index 2e0c0a5aa73a..afb96a509b16 100644 --- a/crates/re_sdk/Cargo.toml +++ b/crates/re_sdk/Cargo.toml @@ -56,4 +56,4 @@ similar-asserts = "1.4.2" [build-dependencies] -re_build_build_info.workspace = true +re_build_tools.workspace = true diff --git a/crates/re_sdk/build.rs b/crates/re_sdk/build.rs index ec5b094a87e5..988e6d9c0929 100644 --- a/crates/re_sdk/build.rs +++ b/crates/re_sdk/build.rs @@ -1,4 +1,4 @@ fn main() { - re_build_build_info::rebuild_if_crate_changed("re_sdk"); - re_build_build_info::export_env_vars(); + re_build_tools::rebuild_if_crate_changed("re_sdk"); + re_build_tools::export_env_vars(); } diff --git a/crates/re_viewer/Cargo.toml b/crates/re_viewer/Cargo.toml index b16b3413ed4d..144a7f5f0a17 100644 --- a/crates/re_viewer/Cargo.toml +++ b/crates/re_viewer/Cargo.toml @@ -111,4 +111,4 @@ wasm-bindgen-futures = "0.4" web-sys = { version = "0.3.52", features = ["Window"] } [build-dependencies] -re_build_build_info.workspace = true +re_build_tools.workspace = true diff --git a/crates/re_viewer/build.rs b/crates/re_viewer/build.rs index f60e91f71c70..7fb960bd4880 100644 --- a/crates/re_viewer/build.rs +++ b/crates/re_viewer/build.rs @@ -1,4 +1,4 @@ fn main() { - re_build_build_info::rebuild_if_crate_changed("re_viewer"); - re_build_build_info::export_env_vars(); + re_build_tools::rebuild_if_crate_changed("re_viewer"); + re_build_tools::export_env_vars(); } diff --git a/crates/re_web_viewer_server/Cargo.toml b/crates/re_web_viewer_server/Cargo.toml index 357dc2cb689d..5af2966905c5 100644 --- a/crates/re_web_viewer_server/Cargo.toml +++ b/crates/re_web_viewer_server/Cargo.toml @@ -64,6 +64,6 @@ re_analytics = { workspace = true, optional = true } [build-dependencies] -re_build_build_info.workspace = true +re_build_tools.workspace = true re_build_web_viewer.workspace = true re_error.workspace = true diff --git a/crates/re_web_viewer_server/build.rs b/crates/re_web_viewer_server/build.rs index 97bde3a85bfa..aad67b7107da 100644 --- a/crates/re_web_viewer_server/build.rs +++ b/crates/re_web_viewer_server/build.rs @@ -1,20 +1,8 @@ #![allow(clippy::unwrap_used)] -fn rerun_if_changed(path: &str) { - // Make sure the file exists, otherwise we'll be rebuilding all the time. - assert!(std::path::Path::new(path).exists(), "Failed to find {path}"); - println!("cargo:rerun-if-changed={path}"); -} - -fn get_and_track_env_var(env_var_name: &str) -> Result { - println!("cargo:rerun-if-env-changed={env_var_name}"); - std::env::var(env_var_name) -} - -fn is_tracked_env_var_set(env_var_name: &str) -> bool { - let var = get_and_track_env_var(env_var_name).map(|v| v.to_lowercase()); - var == Ok("1".to_owned()) || var == Ok("yes".to_owned()) || var == Ok("true".to_owned()) -} +use re_build_tools::{ + get_and_track_env_var, is_tracked_env_var_set, rebuild_if_crate_changed, rerun_if_changed, +}; fn main() { if !is_tracked_env_var_set("IS_IN_RERUN_WORKSPACE") { @@ -37,7 +25,7 @@ fn main() { // We implicitly depend on re_viewer, which means we also implicitly depend on // all of its direct and indirect dependencies (which are potentially in-workspace // or patched!). - re_build_build_info::rebuild_if_crate_changed("re_viewer"); + rebuild_if_crate_changed("re_viewer"); if get_and_track_env_var("CARGO_FEATURE___CI").is_ok() { // If the `__ci` feature is set we skip building the web viewer wasm, saving a lot of time. diff --git a/crates/rerun-cli/Cargo.toml b/crates/rerun-cli/Cargo.toml index dcc84ec29407..e1684080b63f 100644 --- a/crates/rerun-cli/Cargo.toml +++ b/crates/rerun-cli/Cargo.toml @@ -59,4 +59,4 @@ tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } [build-dependencies] -re_build_build_info.workspace = true +re_build_tools.workspace = true diff --git a/crates/rerun-cli/build.rs b/crates/rerun-cli/build.rs index 088016d95b2b..8d72c8c97137 100644 --- a/crates/rerun-cli/build.rs +++ b/crates/rerun-cli/build.rs @@ -1,4 +1,4 @@ fn main() { - re_build_build_info::rebuild_if_crate_changed("rerun-cli"); - re_build_build_info::export_env_vars(); + re_build_tools::rebuild_if_crate_changed("rerun-cli"); + re_build_tools::export_env_vars(); } diff --git a/crates/rerun/Cargo.toml b/crates/rerun/Cargo.toml index f0ccb0b32146..e91911958d63 100644 --- a/crates/rerun/Cargo.toml +++ b/crates/rerun/Cargo.toml @@ -98,4 +98,4 @@ tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } [build-dependencies] -re_build_build_info.workspace = true +re_build_tools.workspace = true diff --git a/crates/rerun/build.rs b/crates/rerun/build.rs index 221ebed6fa28..7bf9de7b089e 100644 --- a/crates/rerun/build.rs +++ b/crates/rerun/build.rs @@ -1,4 +1,4 @@ fn main() { - re_build_build_info::rebuild_if_crate_changed("rerun"); - re_build_build_info::export_env_vars(); + re_build_tools::rebuild_if_crate_changed("rerun"); + re_build_tools::export_env_vars(); } diff --git a/examples/rust/objectron/Cargo.toml b/examples/rust/objectron/Cargo.toml index b7344be54e3b..a91af841ed63 100644 --- a/examples/rust/objectron/Cargo.toml +++ b/examples/rust/objectron/Cargo.toml @@ -20,5 +20,6 @@ prost = "0.11" [build-dependencies] +re_build_tools = { path = "../../../crates/re_build_tools" } prost-build = "0.11" protoc-prebuilt = "0.2" diff --git a/examples/rust/objectron/build.rs b/examples/rust/objectron/build.rs index 3a279a8a5e34..c1f34da20ec7 100644 --- a/examples/rust/objectron/build.rs +++ b/examples/rust/objectron/build.rs @@ -1,12 +1,14 @@ use std::path::PathBuf; +use re_build_tools::{is_tracked_env_var_set, write_file_if_necessary}; + fn main() -> Result<(), std::io::Error> { if std::env::var("CI").is_ok() { // No need to run this on CI (which means setting up `protoc` etc) since the code is committed // anyway. return Ok(()); } - if std::env::var("IS_IN_RERUN_WORKSPACE") != Ok("yes".to_owned()) { + if !is_tracked_env_var_set("IS_IN_RERUN_WORKSPACE") { // Only run if we are in the rerun workspace, not on users machines (if we ever publish the example). return Ok(()); } @@ -52,17 +54,3 @@ fn main() -> Result<(), std::io::Error> { // project's files. write_file_if_necessary(dst_path, &bytes) } - -/// Only touch the file if the contents has actually changed -fn write_file_if_necessary( - dst_path: impl AsRef, - content: &[u8], -) -> std::io::Result<()> { - if let Ok(cur_bytes) = std::fs::read(&dst_path) { - if cur_bytes == content { - return Ok(()); - } - } - - std::fs::write(dst_path, content) -} diff --git a/rerun_py/Cargo.toml b/rerun_py/Cargo.toml index b849717ca4be..af9d4b2b8096 100644 --- a/rerun_py/Cargo.toml +++ b/rerun_py/Cargo.toml @@ -72,7 +72,7 @@ uuid = "1.1" [build-dependencies] -re_build_build_info.workspace = true +re_build_tools.workspace = true pyo3-build-config = "0.18.0" diff --git a/rerun_py/build.rs b/rerun_py/build.rs index b2d92ecdab40..1a965333b124 100644 --- a/rerun_py/build.rs +++ b/rerun_py/build.rs @@ -2,6 +2,6 @@ fn main() { // Required for `cargo build` to work on mac: https://pyo3.rs/v0.14.2/building_and_distribution.html#macos pyo3_build_config::add_extension_module_link_args(); - re_build_build_info::rebuild_if_crate_changed("rerun_py"); - re_build_build_info::export_env_vars(); + re_build_tools::rebuild_if_crate_changed("rerun_py"); + re_build_tools::export_env_vars(); } diff --git a/scripts/publish_crates.sh b/scripts/publish_crates.sh index 33c0b601371a..19d787ee0f82 100755 --- a/scripts/publish_crates.sh +++ b/scripts/publish_crates.sh @@ -91,7 +91,7 @@ export RERUN_IS_PUBLISHING=yes echo "Publishing crates…" cargo publish $FLAGS -p re_build_info -cargo publish $FLAGS -p re_build_build_info +cargo publish $FLAGS -p re_build_tools cargo publish $FLAGS -p re_log cargo publish $FLAGS -p re_tracing cargo publish $FLAGS -p re_int_histogram