feat: add riscv64 architecture support#20
Merged
tschneidereit merged 1 commit intobytecodealliance:mainfrom Apr 5, 2026
Merged
feat: add riscv64 architecture support#20tschneidereit merged 1 commit intobytecodealliance:mainfrom
tschneidereit merged 1 commit intobytecodealliance:mainfrom
Conversation
Map Node.js 'riscv64' arch to 'riscv64gc' to match the release asset naming convention used by wasmtime, wasm-tools, and wit-bindgen. wasmtime v43+ ships riscv64gc-linux binaries; this allows the setup action to install wasmtime on riscv64 runners (e.g. RISE Project ubuntu-24.04-riscv runners). Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Contributor
Author
|
Thanks for the quick review and merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Map Node.js
riscv64arch toriscv64gcto match the release asset naming used by wasmtime, wasm-tools, and wit-bindgen.Problem
On riscv64 runners,
os.arch()returns'riscv64', which hits the defaultthrowingetArch():This blocks any workflow using
bytecodealliance/actions/wasmtime/setupon riscv64, even when wasmtime itself ships riscv64 binaries.Fix
Add a
case 'riscv64': return 'riscv64gc'mapping insrc/system.ts. The suffixgcmatches the target triple used in release assets since wasmtime v27 (e.g.wasmtime-v43.0.0-riscv64gc-linux.tar.xz).The same mapping applies to wasm-tools and wit-bindgen, whose assets follow the same naming convention.
Context
Native riscv64 GitHub Actions runners are available through the RISE Project (label:
ubuntu-24.04-riscv), free for open source projects. This fix allows projects like wasi-sdk to run their full CI on native riscv64 hardware.