Interactive Demo
Anti-pinch control of a vehicle window in real time, implemented as WebAssembly components.
This demonstration runs with the same WebAssembly binaries intended for ECU deployment – in the browser, without modification. The components are written in Rust, compiled once to WebAssembly, and connected via formal WIT interfaces.
What the demo concretely shows:
- Single artefact – the same
.wasmfiles running here in the browser are designed to run unchanged on the target ECU - Versioned interfaces – WIT interfaces such as
aptiv:antipinch/motor-driver-v2@0.1.0define the component protocol in a machine-readable, toolchain-neutral format
Three WebAssembly components work together:
- Anti-Pinch – Detects pinch forces via motor current measurement
- Motor Driver – Simulates the window lift motor with realistic current behaviour
- Soft Start/Stop – Smooth acceleration and deceleration via PWM ramps
How to Use
- ▲ Up / ▼ Down
- Moves the window. In automatic mode (default) a single click is enough – the window runs on its own until it reaches the end stop or a pinch event is detected. In Manual mode the window moves only while the button is held.
- ⏸ Pause / ▶ Resume
- Freezes the entire simulation – motor, signal graph and controls are suspended. Click again to resume seamlessly.
- Finger Switch & Slider
- Available once the window is more than 14 % open. Shows virtual fingers that can be positioned between 20 %–85 % in the window's path, bounded by the current window edge.
Tip: Best viewed at 1920 × 1080 (Full HD) or higher.
Window Status
Controls
Motor Control Signals
Current: 0.00 A
Position: 0.0 mm
RPWM: 0.00
LPWM: 0.00
Next: News · Publications
