A lightweight graphical viewer and editor for SysML v2 models, implemented in Rust with egui. Runs as a native desktop application (OpenBSD, Windows, Linux, macOS) and as a web application (WASM/WebGL) from the same codebase.
Existing SysML v2 graphical tools (Eclipse SysON, Cameo, etc.) are heavyweight Java/web applications that try to do everything. This project takes the opposite approach, drawing from three traditions:
- Do one thing well: render SysML v2 graphical views correctly
- Coordinate, don't subsume: integrate with external tools for editing (Emacs/sysml-mode), validation (sysmlv2-validator), and AI assistance (sysmlv2-skill) rather than reimplementing them
- Prefer clarity over cleverness: straightforward Rust, immediate mode rendering, minimal abstraction
Ben Shneiderman's Visual Information Seeking Mantra (The Eyes Have It, 1996) defines a three-phase interaction pattern for exploring information spaces:
- Overview first — present the full scope so the user orients before acting
- Zoom and filter — let the user narrow focus by spatial zoom and semantic filtering
- Details-on-demand — reveal specifics for the item under attention, without leaving context
This mantra governs how we structure navigation through a SysML model: the browser gives overview, the canvas gives spatial zoom, and the properties panel gives details-on-demand for the selected element.
Jef Raskin's The Humane Interface: New Directions for Designing Interactive Systems (Addison-Wesley, 2000) establishes principles that protect the user's attention and reduce cognitive load:
- Modelessness — the same gesture should always produce the same result; modes are a source of errors
- Locus of attention — the interface should keep the user's focus on content (the model), not on chrome (panels, toolbars, dialogs)
- Habituation — consistent, predictable responses to actions allow the user to develop automatic motor patterns
- Monotony of design — interaction patterns should be uniform across all parts of the interface
- Quantifiable quality — interface efficiency should be measured (GOMS keystrokes, pointer distance), not assumed
These principles push toward a content-dominant canvas, minimal mode switching, and uniform click/zoom/select behavior everywhere.
The GUI reads .sysml text files, parses their structure, and renders
the graphical notation prescribed by the OMG SysML v2 specification.
It is a viewer and navigator first, with editing capabilities added
incrementally.
The primary development platform is OpenBSD. The native build uses eframe with the glow backend (OpenGL ES 2.0+ / OpenGL 3.2+), the same rendering stack proven on OpenBSD by Alacritty. Native builds also target Windows and Linux/macOS.
In native mode the tool has full access to the local filesystem,
the validate-sysml validator, and file watching for live
synchronization with text editors.
The same Rust codebase compiles to WebAssembly and renders via WebGL in any modern browser. eframe provides first-class WASM support — the glow backend maps directly to WebGL with no code changes.
Web deployment serves two purposes:
- Demos and evaluation: host on decisym.ai for prospects to interact with SysML v2 models without installing software
- Enterprise and DoD environments: deploy as a containerized web service for organizations whose managed assets prohibit local software installation. Users access the tool through a browser against a server that holds the model files and runs validation.
In web mode, the validator runs server-side. The WASM client communicates with a backend API for file access and validation results.
The glow (OpenGL) backend is sufficient for standard diagram rendering. For advanced visualizations — large system-of-systems graphs, force-directed layouts with thousands of nodes, interactive exploration of deep model hierarchies — the backend can be switched to wgpu on platforms that support it (Windows/DX12, Linux/Vulkan, web/WebGPU). This is a Cargo feature flag change, not a code rewrite. OpenBSD continues to use the glow backend.
The OMG SysML v2 specification (formal/25-09-03) defines a formal graphical concrete syntax alongside the textual concrete syntax. The graphical notation is specified via Graphical BNF (GBNF) in subclause 8.2.3 of the specification. Key rendering rules:
The fundamental visual distinction in SysML v2:
| Concept | Corner Style | Example Keywords |
|---|---|---|
| Definition (reusable type) | Sharp corners | part def, action def, port def |
| Usage (instance in context) | Rounded corners | part, action, port |
This pattern applies universally across all element kinds.
Each element is a rectangle with:
- Header compartment: keyword label + name (+
: Typefor usages) - Feature compartments: separated by horizontal lines, containing attributes, parts, ports, references, constraints, requirements, actions, or documentation
- Compartment text: may use textual notation identical to the
.sysmlsource
| Relationship | Line Style | End Decoration |
|---|---|---|
Specialization (:>) |
Solid | Hollow triangle at supertype |
| Composition | Solid | Filled diamond at owner |
| Reference | Dashed | Open arrowhead at target |
| Connection | Solid | None (labeled) |
| Dependency | Dashed | Open arrowhead |
| Satisfy | Dashed | satisfy keyword label |
| Flow (object) | Solid arrow | Arrowhead at target |
| Flow (control) | Dashed arrow | Arrowhead at target |
Ports are small rectangles straddling the boundary of their owning
element (half inside, half outside). Port definitions have sharp
corners; port usages have rounded corners. Conjugated ports (~) are
marked distinctly.
SysML v2 replaces fixed diagram types with a view/viewpoint mechanism. Standard view types:
| View Type | Replaces (v1) | Shows |
|---|---|---|
| General View | BDD, Package, Req, UC | Definitions, usages, relationships |
| Interconnection View | IBD | Parts, ports, connections in context |
| Action Flow View | Activity | Actions, control/object flow |
| State Transition View | State Machine | States, transitions |
| Sequence View | Sequence | Event occurrences on lifelines |
| Geometry View | (new) | Spatial items in 2D/3D |
| Grid View | (new) | Tabular element layout |
| Browser View | (new) | Hierarchical membership tree |
| Element | Definition Shape | Usage Shape |
|---|---|---|
| Action | Sharp rectangle | Rounded rectangle |
| State | Sharp rectangle | Rounded rectangle |
| Decision/Merge | Diamond | Diamond |
| Fork/Join | Synchronization bar | Synchronization bar |
Views are enclosed in a frame with a tab (upper-left) showing the view kind keyword and name.
sysmlv2-gui (Rust/egui)
|
+-- reads .sysml files (textual notation)
+-- parses model structure
+-- renders graphical views (egui Painter API)
|
+-- native: calls validate-sysml (Java CLI) for validation
+-- native: watches files for external edits (Emacs/sysml-mode)
+-- web: calls backend API for file access and validation
|
+-- glow backend: OpenGL (native) / WebGL (browser)
+-- wgpu backend: DX12/Vulkan/WebGPU (future, GPU-intensive views)
- Parser: reads
.sysmltextual notation into an in-memory model representation. Does not need full semantic analysis — delegates that to the validator. - Model: internal representation of SysML v2 elements, relationships, and containment hierarchy. Lightweight; not a full KerML metamodel implementation.
- Renderer: translates model elements into graphical primitives (rectangles, lines, text, ports) following the specification's rendering rules. Same code path for native and web.
- Layout: automatic positioning of elements and routing of connectors. Starts simple (force-directed or layered), improves incrementally.
- Panels: model browser (tree), properties panel, diagram canvas, validation output, source text.
- Platform layer: abstracts file I/O and validation behind a trait so native mode calls the filesystem and CLI directly while web mode calls a backend API.
| Tool | Purpose | Interface | Availability |
|---|---|---|---|
| sysmlv2-validator | Syntax/semantic validation | CLI: validate-sysml <file>, GNU error format |
Native + server-side |
| sysml-mode | Emacs editing | File watching for live reload | Native only |
| sysmlv2-skill | AI modeling guidance | Agent skill (Claude Code) | Development |
| Java 21+ | Required by validator | Runtime dependency | Native + server-side |
- Language: Rust (edition 2024)
- GUI: egui with eframe
- Native rendering: glow (OpenGL ES 2.0+ / OpenGL 3.2+)
- Web rendering: glow (WebGL), same backend
- Future GPU: wgpu (DX12, Vulkan, WebGPU) via feature flag
- Platforms: OpenBSD (primary), Windows, Linux, macOS, web browsers
egui was selected after evaluating nine Rust GUI toolkits (egui, iced, fltk-rs, Slint, Makepad, Dioxus, Tauri, xilem, x11rb) against five criteria: cross-platform deployment, OpenBSD support, custom 2D drawing, widget availability, and simplicity.
egui is the only toolkit that satisfies all deployment targets from a single Rust codebase:
- OpenBSD: eframe uses winit + glutin + glow — the same stack proven on OpenBSD by Alacritty
- Windows: native support, drop-in
- Web/WASM: eframe compiles to WebAssembly with WebGL rendering, same Painter API, same rendering code — no separate frontend
- GPU upgrade path: swap the feature flag from glow to wgpu on platforms that support it; no application code changes
- Diagramming + widgets: Painter API for custom 2D drawing alongside built-in panels, menus, and text editing
- Simplicity: immediate mode paradigm, minimal boilerplate, idiomatic Rust
- License: MIT OR Apache-2.0
Alternatives were eliminated for specific reasons:
- fltk-rs: no viable WASM/web path (most "OpenBSD-ish" for native-only, but fails the web deployment requirement)
- iced: OpenBSD requires tiny-skia CPU fallback (risky); web support deprioritized
- Slint: no Canvas widget for custom 2D diagramming
- Tauri/Dioxus: require two codebases (Rust + JS/TS) or route custom drawing through JavaScript eval
- Makepad: unproven on OpenBSD, immature API, sparse documentation
cargo build --releaseRequires:
- Rust toolchain (edition 2024)
- OpenGL-capable display
- For validation: Java 21+,
validate-sysmlon PATH
For slide decks and documents, the native exporter can render a small
set of SysML v2 graphical views directly to PDF from a .sysml
model:
cargo run --bin export_figures -- path/to/model.sysml path/to/output-dirThe exporter is intended for deterministic document assets, not for interactive browsing. It reuses the same parser, layout logic, and graphical-notation theme as the GUI.
trunk serve # development server with hot reload
trunk build --release # production WASM buildRequires:
- Rust toolchain with
wasm32-unknown-unknowntarget - Trunk for WASM bundling
docker build -t sysmlv2-gui .
docker run -p 8080:8080 -v /path/to/models:/models sysmlv2-guiThe container bundles the WASM frontend, a static file server, and
the validate-sysml Java validator for server-side validation.
-
SysML 2.0 Specification — Language (formal/25-09-03): https://www.omg.org/spec/SysML/2.0/About-SysML
- Graphical concrete syntax: subclause 8.2.3 (Graphical BNF)
- View/Viewpoint mechanism: clause 12
-
KerML 1.0 Specification (formal/25-09-01): https://www.omg.org/spec/KerML/1.0/About-KerML
-
Systems Modeling API 1.0 (formal/25-09-07): https://www.omg.org/spec/SystemsModelingAPI/1.0/About-SystemsModelingAPI
-
SysML v2 Release Repository (GBNF files, standard libraries): https://github.com/Systems-Modeling/SysML-v2-Release
-
SysML v2 Pilot Implementation (reference parser/validator): https://github.com/Systems-Modeling/SysML-v2-Pilot-Implementation
-
Graphical Notation Introduction (tutorial PDF): https://github.com/Systems-Modeling/SysML-v2-Release/blob/2025-12/doc/Intro%20to%20the%20SysML%20v2%20Language-Graphical%20Notation.pdf
-
Eclipse SysON (open-source graphical tool, view implementation reference): https://doc.mbse-syson.org/
-
Sodius/Willert SysML v2 Cheat Sheet: https://www.sodiuswillert.com/hubfs/Downloadables/SodiusWillertSysMLv2CheatSheet.pdf
SysML v2.0 was formally adopted by the OMG on July 21, 2025: https://www.omg.org/news/releases/pr2025/07-21-25.htm
MIT OR Apache-2.0