stackdump / rustpflow

pflow encoded petri-net state machines in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rustpflow

Build Status

Go library to use PetriNets encoded using pflow schema to construct state-machines.

Status

Work-in-Progres - aiming do demonstrate a state machine in WASM

Will eventually support code generation from a pflow-encoded petri-net.

This was previously achieved in Golang: https://github.com/stackdump/gopflow

Motivation

Eventually this lib will be used for Factom Asset Token WASM smart contracts.

Since rust has good tooling support for WASM - it seems like a good tool for constructing a library such as this.

Petri-Net GUI editor

Use the Java app

# download the jar
wget https://github.com/FactomProject/ptnet-eventstore/raw/master/pneditor-0.71.jar

# run w/ sun java
/opt/jre1.8.0_211/bin/java -jar /opt/pflow/pneditor-0.71.jar &

open sample ./src/counter.pflow

counter.pflow

Build

Use python to generate rust from pflow xml.

Generate wasm from rust.

pip install .
./gen.py # currently have to copy output
./build.sh

About

pflow encoded petri-net state machines in Rust

License:MIT License


Languages

Language:Python 63.5%Language:Rust 36.2%Language:Shell 0.3%