Skip to content

Commit

Permalink
Generate source path so it can be looked up later.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Sep 19, 2024
1 parent 4ad0248 commit 8255c38
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ categories = ["development-tools::profiling"]
license = "Apache-2.0"

edition = "2021"
rust-version = "1.74"
rust-version = "1.77"

# Required to ensure metadata is visible to dependents. See:
# https://doc.rust-lang.org/cargo/reference/build-scripts.html
# https://github.com/rust-lang/cargo/issues/7846
links="legion_prof_viewer"

[features]
default = []
Expand Down
11 changes: 11 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use std::env;

fn main() {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
println!("cargo::metadata=SOURCE={}", manifest_dir);

// Don't rerun, we don't actually depend on anything
println!("cargo::rerun-if-changed=build.rs");

println!("cargo::warning=Saving path: {}", manifest_dir)
}

0 comments on commit 8255c38

Please sign in to comment.