wasm_machv

WebAssembly MilkIR dialect adapter for target-neutral MachV

wasm
webassembly
milkir
machv
lowering
moon add Milky2018/wasm_machv@0.5.2
Download zip
Author
Version
0.5.2
License
Apache-2.0
Last updated
2 days ago
Downloads
54
README

#Wasm MachV Lowering

Milky2018/wasm_machv validates WebAssembly-specific MilkIR extensions and lowers them into target-neutral MachV. It does not select AArch64 or AMD64 instructions, apply a native ABI, or depend on the Wasmoon runtime.

The embedding environment supplies opaque internal function identities and, as later operation families are migrated, the semantic runtime capabilities required by WebAssembly memory, tables, GC, and exceptions.

lower_function also requires a short-lived WasmValidationContext supplied by the Wasm frontend adapter. It resolves linked function signatures and module-local type, table, aggregate, tag, memory, and segment contracts before instruction selection. The context is not stored in MilkIR or MachV.

#
Environment

type Environment

Embedding-owned identities required by WebAssembly semantic lowering.

Symbols remain unresolved and target-neutral. Address resolution belongs to the embedding product after target emission.

#
lower_function

Lower a verified WebAssembly MilkIR function into target-neutral MachV.

MilkIR parameter zero is the explicit embedding execution environment. Its legacy i64 carrier is contracted to ptr64 in semantic MachV.

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io