3 stable releases

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

#411 in Science

Download history 518/week @ 2023-12-14 265/week @ 2023-12-21 56/week @ 2023-12-28 539/week @ 2024-01-04 121/week @ 2024-01-11 116/week @ 2024-01-18 349/week @ 2024-01-25 347/week @ 2024-02-01 197/week @ 2024-02-08 117/week @ 2024-02-15 129/week @ 2024-02-22 218/week @ 2024-02-29 150/week @ 2024-03-07 211/week @ 2024-03-14 135/week @ 2024-03-21 80/week @ 2024-03-28

613 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–6.5MB