First, you have to configure Spin by following the instructions for your operating system from the Spin documentation.
For example, to install Spin from Linux, macOS, or WSL2, run the following commands:
$ curl -fsSL https://developer.fermyon.com/downloads/install.sh | bash
$ sudo mv spin /usr/local/bin/
Alternatively, you can manually install from a GitHub release, or you can build Spin from source.
At this point, you should be able to run Spin commands:
$ spin --version
spin 1.1.0
Now you can configure the templates and plugins we will use as part of this workshop:
# Install the official Spin templates.
$ spin templates install --git https://github.com/fermyon/spin --update
$ spin templates install --git https://github.com/fermyon/spin-js-sdk --update
# Install a few templates we will use to build applications.
$ spin templates install --git https://github.com/radu-matei/spin-kv-explorer --update
# Install the JavaScript plugin for Spin.
$ spin plugin install js2wasm -y
Depending on the programming languages you want to use, you will need to configure their toolchains. For example:
- Rust (including the Wasm/WASI target:
rustup target install wasm32-wasi
) - Node.js and NPM
- Go and TinyGo
- .NET
A: Make sure you have configured your Rust toolchain, and have added the wasm32-wasi
target using rustup target add wasm32-wasi
.
A: Make sure you have configured Node.js and npm
, and that you have executed npm install
in the directory with your component's package.json
file that contains the dependencies.
In this section you learned how to:
- Install the latest Spin CLI version
- Install the latest Spin templates
- Install the latest Spin plugins
- Proceed to 1. Run your first wasm app on k3d if you still have questions on previous section