3 stable releases

2.2.4 Oct 18, 2023
2.1.4 Oct 17, 2023
2.0.4 Oct 10, 2023

#974 in Science

Download history 466/week @ 2024-11-16 417/week @ 2024-11-23 469/week @ 2024-11-30 307/week @ 2024-12-07 600/week @ 2024-12-14 83/week @ 2024-12-21 291/week @ 2024-12-28 653/week @ 2025-01-04 695/week @ 2025-01-11 868/week @ 2025-01-18 250/week @ 2025-01-25 597/week @ 2025-02-01 848/week @ 2025-02-08 424/week @ 2025-02-15 764/week @ 2025-02-22 1161/week @ 2025-03-01

3,301 downloads per month
Used in fmu-runner

MIT/Apache

55KB
1.5K SLoC

libfmi

Crates.io Documentation Crates.io

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–5MB