#fmi #fmu #model #ode #modelica

sys libfmi

Generated C bindings for the FMI standard

3 stable releases

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

#641 in Science

Download history 1940/week @ 2025-08-27 2352/week @ 2025-09-03 1748/week @ 2025-09-10 2909/week @ 2025-09-17 2583/week @ 2025-09-24 1938/week @ 2025-10-01 1273/week @ 2025-10-08 2437/week @ 2025-10-15 2737/week @ 2025-10-22 1851/week @ 2025-10-29 1745/week @ 2025-11-05 1346/week @ 2025-11-12 2706/week @ 2025-11-19 3516/week @ 2025-11-26 3935/week @ 2025-12-03 8409/week @ 2025-12-10

18,869 downloads per month
Used in 2 crates (via 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)
});

Dependencies

~160–445KB