Skip to content

bytecodealliance/setup-wasi-sdk-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-wasi-sdk-action

A Bytecode Alliance project

Cross-platform CMake-compatible Environment-safe Unit tests

This GitHub Action will install the WASI SDK toolchain for compiling to WebAssembly on a GitHub runner:

Usage

- uses: bytecodealliance/setup-wasi-sdk-action@v1
# Now, use `clang` or `$CC` to compile C/C++ to WebAssembly:
- run: $CC hello.c -o hello.wasm

For more advanced usage, see the following examples:

Inputs

Input Description Required Default
version WASI SDK version to install (e.g., 25) No latest
install-path Directory to install WASI SDK to No $RUNNER_TOOL_CACHE/wasi-sdk
add-to-path Add WASI SDK bin directory to the PATH No true
github-token GitHub token for API requests No ${{ github.token }}

Note that passing latest as the version will attempt to retrieve the latest release tag. See GitHub's variables reference for a description of RUNNER_TOOL_CACHE; other setup-* actions store their artifacts here.

Outputs

Output Description
wasi-sdk-path Path to the installed WASI SDK toolchain
wasi-sdk-version Version of WASI SDK that was installed
clang-path Path to the clang executable
sysroot-path Path to the WASI sysroot

Environment Variables

The action always sets the following environment variables:

  • WASI_SDK_PATH: Path to the WASI SDK installation
  • WASI_SDK_VERSION: Version of WASI SDK that was installed

When add-to-path is true (the default), the action also adds the WASI SDK bin directory to the GitHub runner PATH and sets:

  • CC: Clang compiler with WASI sysroot configured
  • CXX: Clang++ compiler with WASI sysroot configured

Platform Support

This action should be usable on all GitHub runners; open an issue if this is not the case.

OS Architecture Support
Linux x86_64
Linux arm64
macOS Any
Windows Any

License

setup-wasi-sdk-action is released under the Apache License Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.

About

GitHub action to install wasi-sdk

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages