Fix compilation of rust bindings (#166)

This commit is contained in:
SF-Zhou 2025-03-13 11:32:15 +08:00 committed by GitHub
parent 6c856acb4b
commit a188ed39ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 2 deletions

2
Cargo.lock generated
View File

@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 4
[[package]] [[package]]
name = "aho-corasick" name = "aho-corasick"

View File

@ -4,6 +4,10 @@ members = [
"src/storage/chunk_engine", "src/storage/chunk_engine",
"src/lib/rs/hf3fs-usrbio-sys" "src/lib/rs/hf3fs-usrbio-sys"
] ]
default-members = [
"src/client/trash_cleaner",
"src/storage/chunk_engine",
]
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]

View File

@ -7,7 +7,7 @@ fn main() {
println!("cargo::rustc-link-lib=hf3fs_api_shared"); println!("cargo::rustc-link-lib=hf3fs_api_shared");
let bindings = bindgen::Builder::default() let bindings = bindgen::Builder::default()
.header("include/hf3fs_usrbio.h") .header(PathBuf::from(topdir).join("../../api/hf3fs_usrbio.h").display().to_string())
.clang_arg("-std=c99") .clang_arg("-std=c99")
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) .parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.generate() .generate()

View File