wasmerio/wasmer · error
not yet implemented
Error message
not yet implemented
What it means
`get_simd_arch` on the RISC-V singlepass emitter is implemented as `todo!()`, meaning SIMD CPU-feature detection for RISC-V was never written. Any singlepass compilation path that queries the SIMD architecture on RISC-V panics with 'not yet implemented'. It indicates SIMD support is simply missing in the RISC-V backend.
Source
Thrown at lib/compiler-singlepass/src/emitter_riscv.rs:354
fn emit_load_label(&mut self, reg: GPR, label: Label) -> Result<(), CompileError>;
fn emit_call_label(&mut self, label: Label) -> Result<(), CompileError>;
fn emit_call_register(&mut self, reg: GPR) -> Result<(), CompileError>;
fn emit_rwfence(&mut self) -> Result<(), CompileError>;
fn emit_atomic_binop(
&mut self,
op: AtomicBinaryOp,
size: Size,
dest: GPR,
addr: GPR,
source: GPR,
) -> Result<(), CompileError>;
fn emit_reserved_ld(&mut self, size: Size, reg: GPR, addr: GPR) -> Result<(), CompileError>;
}
impl EmitterRiscv for Assembler {
fn get_simd_arch(&self) -> Option<&CpuFeature> {
todo!()
}
fn get_label(&mut self) -> Label {
self.new_dynamic_label()
}
fn get_offset(&self) -> Offset {
self.offset()
}
fn get_jmp_instr_size(&self) -> u8 {
todo!()
}
fn finalize_function(&mut self) -> Result<(), CompileError> {
Ok(())
}
View on GitHub (pinned to 8c4b9ee9d3)
Solutions
- Disable wasm SIMD: config.wasm_simd(false) before creating the engine
- Use the Cranelift backend on RISC-V instead of singlepass
- Upgrade wasmtime to a version where RISC-V SIMD support landed
- Avoid v128-using modules on RISC-V singlepass
Example fix
// before: singlepass on riscv64 + wasm simd -> panic let mut config = Config::new(); config.wasm_simd(true); // after: disable simd on riscv singlepass let mut config = Config::new(); config.wasm_simd(false); // or use Strategy::Cranelift
Defensive patterns
Strategy: validation
Validate before calling
// On riscv64 singlepass, ensure SIMD is off before compiling.
if cfg!(target_arch = "riscv64") {
config.wasm_simd(false);
config.wasm_relaxed_simd(false);
}
// Or validate that module has no v128 ops:
let mut features = WasmFeatures::default();
features.simd = false;
wasmparser::Validator::new_with_features(features).validate_all(&wasm_bytes)?; Try / catch
let result = std::panic::catch_unwind(|| {
Module::new(&engine, &wasm_bytes)
});
match result {
Ok(Ok(m)) => m,
_ => return Err(CompileError::new("singlepass riscv: SIMD unsupported")),
} Prevention
- Disable wasm_simd on RISC-V singlepass targets
- Prefer Cranelift strategy on riscv64
- Test-compile SIMD-using modules per-target in CI
When it happens
Trigger: Running wasm SIMD (v128) code through wasmtime's singlepass RISC-V backend; anything that calls `get_simd_arch` (EmitterRiscv impl at emitter_riscv.rs:354).
Common situations: Deploying wasmtime on RISC-V (riscv64) hardware and compiling modules that use wasm SIMD; enabling wasm_simd in config on RISC-V singlepass.
Related errors
- not yet implemented
- unsupported location
- not yet implemented
- Symbol {} in DWARF not recognized
- internal error: entered unreachable code
AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01).
Data as JSON: /api/errors/a42a7cd9a9568ae2.
Report an issue: GitHub.