docs: add riscv64 native build instructions#608
docs: add riscv64 native build instructions#608gounthar wants to merge 1 commit intoWebAssembly:mainfrom
Conversation
Document how to build WASI SDK from source on native riscv64 Linux hardware. The build requires zero source patches — only cmake flags for skipping compiler tests and limiting to WASIP1 targets. Tested on Banana Pi F3 (SpacemiT K1, rv64gc, 16 GB RAM, Debian Trixie) with WASI SDK v30. Stage 1 (LLVM) takes ~8-10 hours, Stage 2 (sysroot) takes ~15-20 minutes. Ref: WebAssembly#607
|
Thanks for this! I'm not sure that this documentation is all that much different from the Given that I think it might be reasonable to add a note in the README about disabling wasip2/wasip3 for non-allow-listed architectures (or perhaps better yet, codify that in CMake). Another possible alternative would be implementing/documenting downloading the wasi-sysroot from this repository and plopping it into a toolchain. There's no need to build the sysroot on all platforms, for example. |
|
Closing this docs PR as you rightly noted it is mostly redundant with the README. The real value is in CI integration, which I will focus on instead. |
Summary
Add documentation for building WASI SDK from source on native riscv64 Linux hardware.
The build completes with zero source patches — only cmake configuration flags are needed:
-DCMAKE_C_COMPILER_WORKS=ONto skip compiler test (Stage 1 Clang only targets wasm32)-DWASI_SDK_TARGETS="wasm32-wasi;wasm32-wasip1"to skip WASIP2 (wit-bindgen/wasm-tools/wkg don't ship riscv64 binaries)Tested on Banana Pi F3 (SpacemiT K1, rv64gc, 8 cores, 16 GB RAM, Debian Trixie) with WASI SDK v30. Full self-hosted loop verified: C → Clang (native rv64) → .wasm → iwasm (native rv64).
Ref: #607
What this enables
Self-hosted WebAssembly development on RISC-V hardware without needing an x86 or ARM host for compilation.
Test plan