Create a new project

Using Yeoman to create a new WebAssembly provider

Create an empty directory

$ mkdir my-component && cd my-component

Run yo vino

$ yo vino

Yeoman will ask you several questions that it will use to bootstrap your project well.

Note: The generated project comes with some recommended and default settings for Visual Studio Code users. Feel free to ignore, change, or remove them. They are not required to build the project.

Your first schema

Take note of the schema found in schemas/my-component.widl

namespace "my-component"

type Inputs {
  input: string
}

type Outputs {
  output: string
}

This schema defines a component named my-component with one input port named input and one output port named output, both dealing with string data.

Let’s change our component name to ‘greet’ so we have something slightly more meaningful. Your new schema should look like this:

namespace "greet"

type Inputs {
  input: string
}

type Outputs {
  output: string
}