Skip to content

second-state/yomo-flow-ssvm-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssvm-yomo

yomo-flow-ssvm-example

This examples represents how to write a yomo-flow with ssvm

Compile wasm file

# Install ssvmup tool
curl https://raw.githubusercontent.com/second-state/ssvmup/master/installer/init.sh -sSf | sh

cd triple
ssvmup build

will get the wasm file at triple/pkg/ directory

Ξ tmp/triple git:(master) ▶ ssvmup build
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: 🌀  Compiling to Wasm...
   Compiling a22 v0.1.0 (/Users/fanweixiao/tmp/triple)
    Finished release [optimized] target(s) in 0.29s
⚠️   [WARN]: origin crate has no README
[INFO]: ⬇️  Installing wasm-bindgen...
[INFO]: Optimizing wasm binaries with `wasm-opt`...
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
[INFO]: ✨   Done in 1.28s
[INFO]: 📦   Your wasm pkg is ready to publish at /Users/fanweixiao/tmp/triple/pkg.
Ξ tmp/triple git:(master) ▶

Run this flow

  1. Run this yomo-flow
go run main.go

Then start your yomo source and yomo zipper

  1. Run yomo-zipper
yomo wf run workflow.yaml
  1. Run yomo-source-example
gh repo clone yomorun/yomo-source-example
cd yomo-source-example
YOMO_ZIPPER_ENDPOINT=localhost:9999 go run main.go

you'll get:

Ξ _wrk/yomo-sink-ssvm → go run main.go
2021/01/26 00:14:20 Starting sink server...
2021/01/26 00:14:20 ✅ Listening on 0.0.0.0:4141
+6.913980e+015
+9.036794e+015
^Csignal: interrupt

About

Writing a YoMo-flow by SSVM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published