Skip to content

stackdump/rustpflow

Repository files navigation

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published