Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

Setup Wasmtime

v2.0.0

Setup Wasmtime

play

Setup Wasmtime

πŸ‘©β€πŸ’» Wasmtime WebAssembly runtime installer for GitHub Actions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup Wasmtime

uses: jcbhmr/setup-wasmtime@v2.0.0

Learn more about this action in jcbhmr/setup-wasmtime

Choose a version

Setup Wasmtime

πŸ§‘β€πŸ’» Wasmtime WebAssembly runtime installer for GitHub Actions

- uses: jcbhmr/setup-wasmtime@v2
- run: cargo build --target wasm32-wasi
- run: wasmtime target/wasm32-wasi/debug/*.wasm

πŸŸͺ Installs Wasmtime globally
πŸ”’ Supports semver ranges
πŸ“ Caches the Wasmtime installation

Usage

GitHub Actions GitHub

πŸš€ Here's what you're after:

on: push
jobs:
  job:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jcbhmr/setup-wasmtime@v2
      - run: cargo build --target wasm32-wasi
      - run: wasmtime target/wasm32-wasi/debug/*.wasm

Inputs

  • wasmtime-version: Which version of Wasmtime to install. This can be an exact version specifier such as 16.0.0 or a semver range like ~16.0.0 or 16.x. Use latest to always install the latest release. Defaults to latest.

  • wasmtime-token: The GitHub token to use when fetching the version list from bytecodealliance/wasmtime. You shouldn't have to touch this. The default is the github.token if you're on github.com or unauthenticated (rate limited) if you're not on github.com.

Development

Node.js

How do I test my changes?
Open a Draft Pull Request and some magic GitHub Actions will run to test the action.