- Introduced terminal.h header file defining the terminal service API. - Implemented integration tests for terminal service registration and health checks. - Added unit tests for FFI layer, health checks, and terminal service functionality. - Created a mock center for testing terminal registration and deregistration. - Ensured proper error handling and response validation in tests.
18 lines
635 B
Rust
18 lines
635 B
Rust
fn main() {
|
|
let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
let output_file = std::path::PathBuf::from(&crate_dir).join("terminal.h");
|
|
let config_file = std::path::PathBuf::from(&crate_dir).join("cbindgen.toml");
|
|
|
|
println!("cargo:rerun-if-changed=cbindgen.toml");
|
|
println!("cargo:rerun-if-changed=src");
|
|
|
|
let config = cbindgen::Config::from_file(config_file).expect("Unable to read cbindgen config");
|
|
|
|
cbindgen::Builder::new()
|
|
.with_crate(crate_dir)
|
|
.with_config(config)
|
|
.generate()
|
|
.expect("Unable to generate bindings")
|
|
.write_to_file(output_file);
|
|
}
|