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

#136 in Build Utils

Download history 44/week @ 2024-06-16 33/week @ 2024-06-23 8/week @ 2024-06-30 20/week @ 2024-07-07 41/week @ 2024-07-14 34/week @ 2024-07-21 65/week @ 2024-07-28 28/week @ 2024-08-04 28/week @ 2024-08-11 17/week @ 2024-08-18 13/week @ 2024-08-25 18/week @ 2024-09-01 14/week @ 2024-09-08 29/week @ 2024-09-15 27/week @ 2024-09-22 52/week @ 2024-09-29

123 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
~156K SLoC