Skip to content
yomo run <serverless>

yomo run

Run a StreamFunction service.


yomo run [flags] serverless


  • -d, --credential: Set the credential when connecting to Zipper.
  • -m, --modfile: Set the path of custom go.mod file.
  • -n, --name: Set the name of the StreamFunction service, it should match the specific name in Zipper config file.
  • -r, --runtime: Set the runtime of the StreamFunction service, default is WebAssembly by wazero, also support wasmtime, wasmedge and Deno
  • -z, --zipper: Set the address of Zipper to connect.


Follow last tutorial: yomo build, we created a Stream Function accumulator-func, and build it to WebAssembly, and we try run it by yomo dev, Now we will run it with yomo run command.

yomo run -z -n yomo-app-demo sfn.wasm
ℹ️  YoMo Stream Function file: sfn.wasm
Create YoMo Stream Function instance...
ℹ️  Starting YoMo Stream Function instance with executable file: sfn.wasm. Zipper: [].
ℹ️  YoMo Stream Function is running...
time=2023-04-16T22:45:54.265+08:00 level=INFO msg="use credential" component="Stream Function" client_id=jHp0g18hmjk_fL0SvH_6X client_name=yomo-app-demo credential_name=none
time=2023-04-16T22:45:55.461+08:00 level=INFO msg="connected to zipper" component="Stream Function" client_id=jHp0g18hmjk_fL0SvH_6X client_name=yomo-app-demo
sfn received 58 bytes: {"noise":68.54317,"time":1681656355561,"from":"localhost"}
sfn received 59 bytes: {"noise":105.43603,"time":1681656355663,"from":"localhost"}
sfn received 59 bytes: {"noise":138.38487,"time":1681656355764,"from":"localhost"}
sfn received 58 bytes: {"noise":46.46564,"time":1681656355865,"from":"localhost"}
sfn received 59 bytes: {"noise":188.09396,"time":1681656355966,"from":"localhost"}
sfn received 58 bytes: {"noise":93.66026,"time":1681656356067,"from":"localhost"}
sfn received 59 bytes: {"noise":136.37762,"time":1681656356168,"from":"localhost"}

The source code of this example can be found at Github (opens in a new tab)

If you want to craft this demo by yourself, you can start your own Zipper Service by yomo serve and implement your own Source.