rustylink
This crate parses Simulink slx files into a JSON representation and optionally provides code to display or analyze the model.
Important note: At the moment, we only support the R2025a+ file format. At the moment, there are no plans to support older formats, but contributions are welcome.

This viewer is intended to be a starting point for building your own tools around Simulink models. While it does not intend to be a complete Simulink viewer (many features are unsupported), it is still useful for automation tasks.
You don't need a MATLAB or Simulink license or installation to use this tool.
Quick start
- Build:
- Run against your workspace root system:
Non-GUI examples
Print an ASCII tree of SubSystems in a model (works with .slx or individual XML):
Or point to an XML system file:
Library usage
use SimulinkParser;
use Utf8PathBuf;
let parser = new;
let system = parser.parse_system_file?;
println!;
Notes
- The data model is intentionally generic (maps for properties) to accommodate varying Simulink versions.
- Extend
model.rsto add more explicit types for blocks you care about.
Optional Features
egui: Interactive viewer UI.highlight: Syntax highlighting support inside viewer.mask: (Experimental) Simple mask display evaluation. When enabled, blocks with a mask whose<Display>is of the formdisp(var{param})and whose<Initialization>definesvar={'A','B',...};plus a popup<MaskParameter Name="param">with a numeric leading index in its<Value>will render the selected entry text inside the block instead of the default icon. This is a tiny custom parser – no MATLAB engine required.
Example mask snippet supported:
disp(mytab{control})
mytab={'Position','Zero Torque','OFF'};
1. Position Control
Enable via: