3 stable releases
2.2.4 | Oct 18, 2023 |
---|---|
2.1.4 | Oct 17, 2023 |
2.0.4 | Oct 10, 2023 |
#867 in Science
1,997 downloads per month
Used in fmu-runner
55KB
1.5K
SLoC
libfmi
Generated Rust fmi-standard bindings.
This crate also includes a variadic logging handler as inspired by rust-fmi.
Example
use libfmi::Fmi2Dll;
let fmi = unsafe { Fmi2Dll::new("../tests/fmu/bouncing_ball/binaries/linux64/bouncing_ball.so") }?;
let version = unsafe { fmi.fmi2GetVersion() };
println!("FMI version: {:?}", unsafe {
std::ffi::CStr::from_ptr(version)
});
lib.rs
:
Generated Rust fmi-standard bindings.
This crate also includes a variadic logging handler as inspired by rust-fmi.
Example
use libfmi::Fmi2Dll;
let fmi = unsafe { Fmi2Dll::new("../tests/fmu/bouncing_ball/binaries/linux64/bouncing_ball.so") }?;
let version = unsafe { fmi.fmi2GetVersion() };
println!("FMI version: {:?}", unsafe {
std::ffi::CStr::from_ptr(version)
});
Dependencies
~0.1–4.5MB