Skip to main content

Creating Runnables

note

Make sure you have the prerequisites installed before proceeding.

You can create a new Runnable with subo:

subo create runnable myfunction

By default, Rust will be used. To use one of the other supported languages, pass the relevant value of the --lang parameter:

Language--lang=
JavaScript--lang=javascript
TypeScript--lang=typescript
Swift--lang=swift
AssemblyScript--lang=assemblyscript
TinyGo--lang=tinygo
Grain--lang=grain
Rust--lang=rust

For example, to use JavaScript, pass --lang=javascript:

subo create runnable myjavascriptfunction --lang=javascript

Each runnable has a .runnable.yaml that describes it. The name you provide to the create runnable command is the name that will be used to call the Runnable in Directive handlers, which are discussed next.

Your Runnables will use the Runnable API to access resources such as the network, files, and more.