Expand description
herkos-runtime — Runtime library for herkos transpiled output.
This crate is #![no_std] by default. It provides:
IsolatedMemory<const MAX_PAGES: usize>for Wasm linear memoryWasmTrap/WasmResult<T>for Wasm trap handling- Trait definitions for capability-based host imports (Phase 3+)
Structs§
- FuncRef
- A single table entry: a typed function reference.
- Isolated
Memory - Isolated linear memory for a single Wasm module.
- Library
Module - A module that does NOT define its own memory (§4.1).
- Module
- A module that defines its own memory (§4.1).
- Table
- Indirect call table with a compile-time maximum size.
Enums§
- Construction
Error - Errors that occur during module/memory/table construction.
- Wasm
Trap - Wasm execution errors — no panics, no unwinding.
Constants§
- PAGE_
SIZE - WebAssembly page size: 64 KiB per the Wasm specification.
Functions§
- i32_
div_ s - Wasm
i32.div_s: signed integer division, trapping on divide-by-zero or signed overflow (i32::MIN / -1). Both cases produceNonefromchecked_div, which maps toDivisionByZero. - i32_
div_ u - Wasm
i32.div_u: unsigned integer division, trapping on divide-by-zero. - i32_
rem_ s - Wasm
i32.rem_s: signed remainder, trapping on divide-by-zero. - i32_
rem_ u - Wasm
i32.rem_u: unsigned remainder, trapping on divide-by-zero. - i32_
trunc_ f32_ s - Wasm
i32.trunc_f32_s: truncate f32 toward zero to i32, trapping on NaN/overflow. - i32_
trunc_ f32_ u - Wasm
i32.trunc_f32_u: truncate f32 toward zero to u32 (returned as i32), trapping on NaN or out-of-range input. - i32_
trunc_ f64_ s - Wasm
i32.trunc_f64_s: truncate f64 toward zero to i32, trapping on NaN/overflow. - i32_
trunc_ f64_ u - Wasm
i32.trunc_f64_u: truncate f64 toward zero to u32 (returned as i32), trapping on NaN or out-of-range input. - i64_
div_ s - Wasm
i64.div_s: signed integer division, trapping on divide-by-zero or signed overflow (i64::MIN / -1). - i64_
div_ u - Wasm
i64.div_u: unsigned integer division, trapping on divide-by-zero. - i64_
rem_ s - Wasm
i64.rem_s: signed remainder, trapping on divide-by-zero. - i64_
rem_ u - Wasm
i64.rem_u: unsigned remainder, trapping on divide-by-zero. - i64_
trunc_ f32_ s - Wasm
i64.trunc_f32_s: truncate f32 toward zero to i64, trapping on NaN/overflow. - i64_
trunc_ f32_ u - Wasm
i64.trunc_f32_u: truncate f32 toward zero to u64 (returned as i64), trapping on NaN or out-of-range input. - i64_
trunc_ f64_ s - Wasm
i64.trunc_f64_s: truncate f64 toward zero to i64, trapping on NaN/overflow. - i64_
trunc_ f64_ u - Wasm
i64.trunc_f64_u: truncate f64 toward zero to u64 (returned as i64), trapping on NaN or out-of-range input.
Type Aliases§
- Wasm
Result - Result type for Wasm operations —
Result<T, WasmTrap>.