Fieldbooks / WebAssembly / Lesson 06
Lesson 06 of 08 · Course index 00 Start Here: What & WhyStack & control 01 Jump or trap?02 Stack types03 Branch targets04 Unreachable codeMemory & calls 05 Page bounds06 Indirect calls→ Verification 07 Two verifier designs08 Transfer exam Lesson 06 / Memory & calls
Which host function can run? Your plug-in may call one of two functions supplied by the app. Such a function is a host import. The sandbox limits the plug-in to the listed functions. A table stores them in numbered slots. call_indirect takes a slot number from the stack and requests a signature, the input and result types it expects. Both functions here return their input. Choose a slot that can safely accept the value read from memory.
+ Figure 06
A call through a numbered slot
i
1 · The big idea To do useful work (like printing text or sending a network reply), a sandboxed plugin calls functions supplied by the host app—called host imports . When calling through a dynamic index (like a function pointer in C or virtual method in C++/Rust), WebAssembly uses call_indirect.
call_indirect looks up a numbered slot inside a fixed function table and checks two things in order: first, the verifier checks statically that the stack has the argument types and an i32 slot index; second, at runtime the runner checks that the slot exists and that the target function’s actual signature (inputs → outputs) matches the requested signature.
Even if the stack passes verification, calling slot 0 when slot 0 expects i64 while the caller requested i32 traps cleanly before entering the host function.
→
2 · Worked step-by-step example Step-by-step worked trace for lesson 6 call_indirect Checks Table Slot Signature Before Entering Function Stack: [0 i32, 0 slot] Verifier: PASS Table[0] = echo64 i64->i64 != i32->i32 Table[1] = echo32 Fix: slot 1 -> 1 call Slot 0 traps cleanly with 0 host calls; slot 1 matches echo32. Worked Example: Reading Slot 0 From Memory and Calling Table[0]
Load 4 zero bytes from address 65532 → pushes argument 0 (i32), then push slot 0 (i32). Verifier: Sees [i32 arg, i32 slot] matching requested (i32) → (i32) → passes!Runner: Looks up table slot 0, which holds echo64 (i64 → i64).Actual signature i64 → i64 ≠ requested i32 → i32 → traps before calling! Switching to slot 1 (echo32) succeeds. Result: Indirect calls enforce both static argument types and exact runtime signature matching on the target table slot.
Read the case Read four bytes at 65532 → i32 value 0
Slot 0 · echo64 · i64 in, i64 out
Slot 1 · echo32 · i32 in, i32 out
Request · slot 0 · i32 in, i32 out
≡
3 · Bytecode stepper (explore before quizzing) First check the stack against the requested signature. At runtime, look up the slot, check that it exists and holds a function, then compare the function’s signature. Only a match permits the call. The earlier memory read has its own bounds check.
Bytecode is the list of machine instructions below. Step through Check types and Run values before answering the prediction below.
Check types Instruction step Step 0Ready 0 / 4
Start with an empty stack. Read the instructions in order.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right [ ] Empty
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
Step forward →
Step 1i32.const 1 / 4
Push the type i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 2i32.load 2 / 4
Check the address and value types. The actual address is checked during execution.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 3i32.const 3 / 4
Push the type i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right i32 i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 4call_indirect 4 / 4
Check the table index and argument types. The selected slot is checked during execution.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Types accepted
Run values Instruction step Step 0Ready 0 / 4
Start with an empty stack and one page of zero bytes.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right [ ] Empty
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
Step forward →
Step 1i32.const 1 / 4
Push the value 65532.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right i32 65532
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Step forward →
Step 2i32.load 2 / 4
The entire range fits. Read four bytes as an i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right i32 0
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Base 65532 + offset 0 = 65532. Four bytes need [65532, 65536). The whole range fits.
← Back Step forward →
Step 3i32.const 3 / 4
Push the value 0.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right i32 0 i32 0
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Step forward →
Step 4call_indirect 4 / 4
Indirect call signature mismatch at slot 0 (echo64).
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 003 call_indirect (i32) → i32Operand stack top at right i32 0 i32 0
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Run trapped
?
4 · Make a prediction The read fits. Does the checker or the runner stop this call? ↗
5 · Repair the program Read the last four bytes of the page and complete one host call with the resulting i32. Use slot 1 and read at 65532 Repair confirmed. The read fits exactly. Slot 1 names echo32, which accepts the i32 and returns it.
Types accepted Run finished Calls 1 Writes 0
Step through this edit Check types Instruction step Step 0Ready 0 / 4
Start with an empty stack. Read the instructions in order.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right [ ] Empty
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
Step forward →
Step 1i32.const 1 / 4
Push the type i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 2i32.load 2 / 4
Check the address and value types. The actual address is checked during execution.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 3i32.const 3 / 4
Push the type i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32 i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 4call_indirect 4 / 4
Check the table index and argument types. The selected slot is checked during execution.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Types accepted
Run values Instruction step Step 0Ready 0 / 4
Start with an empty stack and one page of zero bytes.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right [ ] Empty
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
Step forward →
Step 1i32.const 1 / 4
Push the value 65532.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32 65532
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Step forward →
Step 2i32.load 2 / 4
The entire range fits. Read four bytes as an i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32 0
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Base 65532 + offset 0 = 65532. Four bytes need [65532, 65536). The whole range fits.
← Back Step forward →
Step 3i32.const 3 / 4
Push the value 1.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32 0 i32 1
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Step forward →
Step 4call_indirect 4 / 4
Slot 1 matches. echo32 returns its argument.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32 0
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Run finished
Use slot 2 and read at 65532 Inspect this edit. Only slots 0 and 1 exist. Lookup at slot 2 stops before a function is entered.
Types accepted Run trapped Calls 0 Writes 0
Step through this edit Check types Instruction step Step 0Ready 0 / 4
Start with an empty stack. Read the instructions in order.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right [ ] Empty
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
Step forward →
Step 1i32.const 1 / 4
Push the type i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 2i32.load 2 / 4
Check the address and value types. The actual address is checked during execution.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 3i32.const 3 / 4
Push the type i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right i32 i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 4call_indirect 4 / 4
Check the table index and argument types. The selected slot is checked during execution.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Types accepted
Run values Instruction step Step 0Ready 0 / 4
Start with an empty stack and one page of zero bytes.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right [ ] Empty
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
Step forward →
Step 1i32.const 1 / 4
Push the value 65532.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right i32 65532
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Step forward →
Step 2i32.load 2 / 4
The entire range fits. Read four bytes as an i32.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right i32 0
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Base 65532 + offset 0 = 65532. Four bytes need [65532, 65536). The whole range fits.
← Back Step forward →
Step 3i32.const 3 / 4
Push the value 2.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right i32 0 i32 2
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Step forward →
Step 4call_indirect 4 / 4
Indirect call table index out of bounds: 2.
Bytecode instruction address 00 i32.const 6553201 i32.load02 i32.const 203 call_indirect (i32) → i32Operand stack top at right i32 0 i32 2
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Run trapped
Use slot 1 and read at 65533 Inspect this edit. The function would match. The read crosses the page edge first, so the runner never reaches the call.
Types accepted Run trapped Calls 0 Writes 0
Step through this edit Check types Instruction step Step 0Ready 0 / 4
Start with an empty stack. Read the instructions in order.
Bytecode instruction address 00 i32.const 6553301 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right [ ] Empty
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
Step forward →
Step 1i32.const 1 / 4
Push the type i32.
Bytecode instruction address 00 i32.const 6553301 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 2i32.load 2 / 4
Check the address and value types. The actual address is checked during execution.
Bytecode instruction address 00 i32.const 6553301 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 3i32.const 3 / 4
Push the type i32.
Bytecode instruction address 00 i32.const 6553301 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32 i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Step forward →
Step 4call_indirect 4 / 4
Check the table index and argument types. The selected slot is checked during execution.
Bytecode instruction address 00 i32.const 6553301 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 – 65528
– 65529
– 65530
– 65531
– 65532
– 65533
– 65534
– 65535
× 65536+
Type checking does not read or write bytes.
← Back Types accepted
Run values Instruction step Step 0Ready 0 / 2
Start with an empty stack and one page of zero bytes.
Bytecode instruction address 00 i32.const 6553301 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right [ ] Empty
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
Step forward →
Step 1i32.const 1 / 2
Push the value 65533.
Bytecode instruction address 00 i32.const 6553301 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32 65533
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Each pair is one byte in base sixteen. The striped guard region marks addresses outside the page.
← Back Step forward →
Step 2i32.load 2 / 2
Memory access out of bounds: [65533, 65537) exceeds 65536 bytes.
Bytecode instruction address 00 i32.const 6553301 i32.load02 i32.const 103 call_indirect (i32) → i32Operand stack top at right i32 65533
Control label stack innermost at right function h=0
Each label keeps its entry height (h = stack height when the block opened).
Linear memory Tail of page 0 00 65528
00 65529
00 65530
00 65531
00 65532
00 65533
00 65534
00 65535
× 65536+
Base 65533 + offset 0 = 65533. Four bytes need [65533, 65537). The end exceeds 65536. No bytes move.
← Back Run trapped
{ }
Code workshop Implement requireSlot in my-rules.mjs. Check the selected table slot and its signature before allowing the call. The first command makes your own copy of the starter if needed. Edit the named function, then run the second command.
cp -n workshop/starter.mjs my-rules.mjs
node workshop/check.mjs 6 ./my-rules.mjsOptional worked example in a separate file Build the lookup for this table. Each entry here stands for one signature. Try slot 0 and then slot 1.
function requireSlot(table, slot, signature) {
const actual = table[slot >>> 0]
if (actual == null) throw Error("missing function")
if (actual !== signature) throw Error("wrong signature")
return actual
}
console.log(requireSlot(["i64→i64", "i32→i32"], 1, "i32→i32"))Slot 1 passes. In the supplied engine, a signature is a pair of type lists. Match both lists in order before the host call count goes up.
Key Takeaway & Next Up call_indirect pairs static stack checking with runtime table bounds and signature checks so plugins can never jump into functions with mismatched arguments.
Next: Next, we compare two classic ways to implement the bytecode verifier itself: one-pass streaming vs. two-pass graphs.
Edit the bytecode Change the numbered inputs or instructions and run the checker again. Each run starts with a fresh page. This editor accepts a JSON object containing the decoded instructions.
Program Check and run
Free to Learn: Build a WebAssembly Stack-Machine Verifier & Linear-Memory Sandbox Lab