Skip to content

feat: add riscv64 architecture support#20

Merged
tschneidereit merged 1 commit intobytecodealliance:mainfrom
gounthar:feat/riscv64-support
Apr 5, 2026
Merged

feat: add riscv64 architecture support#20
tschneidereit merged 1 commit intobytecodealliance:mainfrom
gounthar:feat/riscv64-support

Conversation

@gounthar
Copy link
Copy Markdown
Contributor

@gounthar gounthar commented Apr 5, 2026

Map Node.js riscv64 arch to riscv64gc to match the release asset naming used by wasmtime, wasm-tools, and wit-bindgen.

Problem

On riscv64 runners, os.arch() returns 'riscv64', which hits the default throw in getArch():

Error: Unsupported operating system architecture: riscv64

This blocks any workflow using bytecodealliance/actions/wasmtime/setup on riscv64, even when wasmtime itself ships riscv64 binaries.

Fix

Add a case 'riscv64': return 'riscv64gc' mapping in src/system.ts. The suffix gc matches 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.

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>
Copy link
Copy Markdown
Member

@tschneidereit tschneidereit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tschneidereit tschneidereit merged commit 770bda3 into bytecodealliance:main Apr 5, 2026
46 checks passed
@gounthar
Copy link
Copy Markdown
Contributor Author

gounthar commented Apr 5, 2026

Thanks for the quick review and merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants