From fc17efdd0cf1b4a70ad64d83ec13f5de15bb4f2b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 13 Jul 2026 16:28:57 +0100 Subject: [PATCH] Add TODO in `encode` to make it actually write out the entire module and not just the functions --- core/rexcode/ir/wasm/encoder.odin | 1 + 1 file changed, 1 insertion(+) diff --git a/core/rexcode/ir/wasm/encoder.odin b/core/rexcode/ir/wasm/encoder.odin index 0c5408cb2..7614f755d 100644 --- a/core/rexcode/ir/wasm/encoder.odin +++ b/core/rexcode/ir/wasm/encoder.odin @@ -44,6 +44,7 @@ encode_max_relocation_count :: #force_inline proc "contextless" (n: int) -> int // the total byte count written. (A Module built as one function / one block // reproduces the old flat `encode([]Instruction)` behavior exactly.) encode :: proc(m: Module, code: []u8, relocs: ^[dynamic]Relocation, errors: ^[dynamic]Error) -> (byte_count: u32, ok: bool) { + // TODO(bill): This just writes the functions and nothing to do with the module section stuff errors_start := u32(len(errors)) op_index := u16(0) for fn in m.functions {