8 stable releases (4 major)

4.0.2 Mar 11, 2024
4.0.1 Mar 10, 2024
3.1.0 Mar 2, 2024
3.0.2 Jun 7, 2023
0.1.0 Dec 14, 2021

#75 in Science

Download history 39/week @ 2024-02-12 43/week @ 2024-02-19 244/week @ 2024-02-26 307/week @ 2024-03-04 549/week @ 2024-03-11 69/week @ 2024-03-18 46/week @ 2024-03-25 86/week @ 2024-04-01 24/week @ 2024-04-08 34/week @ 2024-04-15 45/week @ 2024-04-22 49/week @ 2024-04-29 42/week @ 2024-05-06 23/week @ 2024-05-13 42/week @ 2024-05-20 37/week @ 2024-05-27

144 downloads per month
Used in 15 crates (8 directly)

MIT license

24KB
640 lines

Simulink C to Rust library wrapper and binder

The template directory contains the blueprint for importing generated C code from Simulink into Rust.

Simply copy and rename the template directory, then:

  • in Cargo.toml, set the package name,
  • copy all the Simulink source (.c) and header (.h) files into the sys folder,
  • in build.rs, pass the name of the Rust structure that will implement the Rust version of the Simulink controller as argument to simulink_rs::Sys::new(Some("...")),

and finally run cargo build to check that the new crate is build without errors.


lib.rs:

Simulink C Rust wrapper and binder

A Rust library to import generated C code from Simulink in Rust

Example

let sys = Sys::new(Some("MySimulinkController"));
sys.compile().generate_module();

Dependencies

~6–8.5MB
~155K SLoC