#component #dom #finite-state-machine #html


A crate to create WASM component like Vue.js with a logic of Finite State Machine. Uses wasm-bindgen

8 releases

0.1.7 Oct 8, 2020
0.1.6 May 12, 2020

#1281 in WebAssembly

21 downloads per month

GPL-3.0 license

750 lines


A Rust crate to create Web-Assembly component for Rust structure with a logic of Finite State Machine.

How to use

To use the crate you have to implement the DOMComponent trait and the Machine trait. The Machine will handle all the transition between states and handle the data manipulation, while the DOMComponent represents the interface for a Machine to interact with a Driver.

For the moment there is only 1 Driver type and 1 App type. But the logic is to be able to expand this logic to other graphical environment than the DOM (ex: Piston, App, Desktop...)


This crate contains the basic tools to create a Rust-WebAssembly application with a logic of Driver and Finite State Machine. Each Driver is associated to StateMachine in an App and the App handles the communication between the Graphic Context and the Drivers.

(why are you asking yourselve, haven't he done it on each Drivers are you saying ? That's because I don't want to have X closures to forget on the Rust side, so I am coercing all the lifetimes into the App and forgetting only 1 closure, the App's one. There surely are better solutions but for the moment i don't know :) )


~217K SLoC