-
AssertInvalidthat passes validation -> fail, not skip -
AssertUnlinkablethat instantiates successfully -> fail, not skip -
AssertMalformedthat parses successfully -> fail, not skip -
AssertTrap(Wat)encode errors now count as failures, not passes -
Moduledirective instantiation failures now count as skips with diagnostics
-
definitions: HashMap<String, Vec<u8>>inComponentTestRunner -
named_instances: HashMap<String, usize>+instances: Vec<ComponentInstance> -
ModuleDefinition,ModuleInstance,Registerdirectives handled -
invoke_componentsupports named instance dispatch viamodule_name: Option<&str>
- Reject root-level component imports (importing another component)
- Reject root-level component exports (exporting inner component)
- Reject reexport of imported function without implementation
- Reject type nesting deeper than 100 levels
-
decode_op,decode_block_type,peephole_optimizemoved toinstruction.rs -
Op,OP_*constants,compile_bodyextracted to newopcode.rs - Clean separation:
instruction.rs= parsed IR,opcode.rs= compiled bytecode
-
lift_results,lift_value,lift_string_result→canonical_abi.rs -
lower_component_args,lower_list→canonical_abi.rs -
invokedelegates toinvoke_component(no code duplication)
- C1: Section parser boilerplate extraction
- C2:
CoreExport→ single struct withkind: ExportKindfield - C3:
Fromimpls for type conversions - C4: Inconsistent error message formats
- C6:
result_typesallocation inexec::call
- Current stub returns
Box::new(|_args, _mem| Vec::new())— no-op - Needs
Arc<Mutex<Store>>interior mutability refactor (NOT Rc — must be Send+Sync) - Trampoline closure captures shared ref to source instance store + Module clone
- Change
ComponentInstance::invoketo borrow viaMutex::lock - High complexity, high impact — unlocks all cross-instance calls
- Unlocks: comp_wt_fused (9 sub-failures), prerequisite for D2/D3
parse_canonical_sectiononly handlesCanonicalFunction::Lift, dropsLower- Without Lower, cross-component function calls (adapter pattern) fail
- Depends on D1 (real trampolines)
- Unlocks: fused, adapter, aliasing tests
- Lift strings from linear memory via
(ptr, len)pairs -
lift_string_result,read_string_descriptor,read_utf8_stringincanonical_abi.rs - comp_val_strings, comp_wt_strings now pass
-
lower_listcalls realloc, validates pointer bounds -
lower_component_argsdispatches scalar vs list args - comp_wt_adapter now passes
-
convert_wast_argshandles Bool, S8/U8, S16/U16, Char types - Currently only stores
result, not params inComponentFuncTypeDef
-
Value::default_forno longer panics (returns Result) - Propagate Result through
Store::new_with_imports→ComponentInstance::instantiate - Remove
catch_unwindfrom test harness (once no more panics possible during instantiation)
- assert_unlinkable tests require checking that provided instances match declared import types
- Export kind matching (expected func found global, etc.)
- Export/import signature matching (function types, table types, memory limits, global types)
- Missing export detection
- Resource type matching
- Unlocks: comp_wt_modules (24 sub-failures), comp_wt_linking (4), comp_wt_instance (6), comp_wt_resources (3), comp_wt_import (1)
Core spec tests: 84 pass, 0 fail, 13 ignored Component tests: 72 pass, 0 fail, 0 ignored
comp_wt_adapter— fixed by implementing list canonical ABI lowering (D3b)comp_val_strings— fixed by implementing string canonical ABI lifting (D3)comp_async_trap_if_block_and_sync— disabled (wast parser v245 doesn't supportthread.yield-to)
-
AssertTrap(Wat)encode errors now count as failures, not passes -
Moduledirective instantiation failures now count as skips, not passes -
ModuleInstanceinstantiation failures now count as skips, not passes - Better error messages:
assert_returnshows both got and expected values -
convert_wast_argshandles Bool, S8/U8, S16/U16, Char types -
component_value_matcheshandles F32/F64 (bit-exact comparison)
cargo run -p wust --example plasma_hello --release— runs JS inside WASM, both "hello world" and fibonacci pass- getrandom custom backend via
.cargo/config.tomlrustflags- TODO: patch boa fork (
AlbertMarashi/boa,albert/combined-fixes) to userand = { default-features = false, features = ["small_rng"] }and store a seededSmallRngin boa'sContextforMath.random(). Then remove.cargo/config.tomland custom getrandom backend from plasma.
- TODO: patch boa fork (
- WIT interface defined at
crates/plasma/wit/world.wit make plasma-componentwraps core module as component viawasm-tools