bcachefs-tools/rust-src/build.rs
Thomas Bertschinger 0a284fc4ff convert main() from C to Rust
This moves the main() function from C to Rust. It also updates the name
of the Rust package from "bcachefs-rust" to "bcachefs-tools".

Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-16 01:46:41 -05:00

22 lines
763 B
Rust

fn main() {
println!("cargo:rustc-link-search=..");
println!("cargo:rerun-if-changed=../libbcachefs.a");
println!("cargo:rustc-link-lib=static:+whole-archive=bcachefs");
println!("cargo:rustc-link-lib=urcu");
println!("cargo:rustc-link-lib=zstd");
println!("cargo:rustc-link-lib=blkid");
println!("cargo:rustc-link-lib=uuid");
println!("cargo:rustc-link-lib=sodium");
println!("cargo:rustc-link-lib=z");
println!("cargo:rustc-link-lib=lz4");
println!("cargo:rustc-link-lib=zstd");
println!("cargo:rustc-link-lib=udev");
println!("cargo:rustc-link-lib=keyutils");
println!("cargo:rustc-link-lib=aio");
if std::env::var("BCACHEFS_FUSE").is_ok() {
println!("cargo:rustc-link-lib=fuse3");
}
}