csbindgen/csbindgen-tests/src/lib.rs

30 lines
792 B
Rust
Raw Normal View History

2023-02-27 23:08:46 +00:00
#[allow(dead_code)]
#[allow(non_snake_case)]
#[allow(non_camel_case_types)]
#[allow(non_upper_case_globals)]
mod lz4;
2023-02-26 18:31:44 +00:00
2023-02-27 23:08:46 +00:00
#[allow(dead_code)]
#[allow(non_snake_case)]
#[allow(non_camel_case_types)]
mod lz4_ffi;
2023-02-26 18:31:44 +00:00
2023-02-27 22:18:10 +00:00
#[test]
fn build_test() {
let path = std::env::current_dir().unwrap();
println!("starting dir: {}", path.display()); // csbindgen/csbindgen-tests
2023-02-26 18:31:44 +00:00
2023-02-27 22:18:10 +00:00
// unsafe {
// let num = lz4::LZ4_versionNumber();
// println!("lz4 num: {}", num);
// }
2023-02-26 18:31:44 +00:00
2023-02-27 22:18:10 +00:00
csbindgen::Builder::new()
.input_bindgen_file("src/quiche.rs")
.rust_method_prefix("csbindgen_quiche_")
.csharp_class_name("LibQuiche")
.csharp_dll_name("libquiche")
.generate_to_file("src/quiche_ffi.rs", "../dotnet-sandbox/quiche_bindgen.cs")
.unwrap();
2023-02-26 18:31:44 +00:00
}