4 releases (stable)

new 2.0.1 Mar 14, 2023
2.0.0 Mar 13, 2023
1.0.0 Mar 9, 2023
0.1.0 Dec 14, 2021

#69 in Template engine

Download history 1/week @ 2022-12-02 1/week @ 2022-12-16 1/week @ 2022-12-23 1/week @ 2023-01-06 2/week @ 2023-01-20 5/week @ 2023-01-27 2/week @ 2023-02-03 3/week @ 2023-02-10 3/week @ 2023-02-17 4/week @ 2023-02-24 8/week @ 2023-03-03 69/week @ 2023-03-10

85 downloads per month
Used in 10 crates (6 directly)

MIT license

12KB
258 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

~4.5MB
~109K SLoC