Integrate Rust Code into Simulink
Starting in R2026a, you can import external Rust code that is compatible with C into Simulink. You can simulate and test custom Rust logic alongside Simulink model components, enabling simulation between Simulink and Rust code. Additionally, you can generate Rust bindings for C code generated from Simulink models. Rust programs can call Simulink generated functions and access model data. To import Rust code or generate Rust bindings, you must install the Simulink Support Package for Rust Code.
Functions
coder.RustWrapper.genRustBindings | Create Rust bindings for C code generated from Simulink models (Since R2026a) |
Topics
- Install Simulink Support Package for Rust Code
Set up prerequisite products and install the Simulink Support Package for Rust Code.
- Import C Compatible Rust Code into Simulink Using the Rust Importer Wizard
Import C compatible Rust code into Simulink.
- Generate Rust Bindings for Simulink Generated C Code (Embedded Coder)
Learn how to generate Rust bindings for C code generated from a Simulink model using the Rust wrapper API.