| 1 |
0x0 | 00 61 73 6d | version 1 (Module) |
| 2 |
| 01 00 00 00 |
| 3 |
0x8 | 01 08 | type section |
| 4 |
0xa | 02 | 2 count |
| 5 |
--- rec group 0 (implicit) --- |
| 6 |
0xb | 60 01 7f 00 | [type 0] SubType { is_final: true, supertype_idx: None, composite_type: CompositeType { inner: Func(FuncType { params: [I32], results: [] }), shared: false } } |
| 7 |
--- rec group 1 (implicit) --- |
| 8 |
0xf | 60 00 00 | [type 1] SubType { is_final: true, supertype_idx: None, composite_type: CompositeType { inner: Func(FuncType { params: [], results: [] }), shared: false } } |
| 9 |
0x12 | 02 07 | import section |
| 10 |
0x14 | 01 | 1 count |
| 11 |
0x15 | 01 6d 01 6e | import [func 0] Import { module: "m", name: "n", ty: Func(0) } |
| 12 |
| 00 00 |
| 13 |
0x1b | 03 04 | func section |
| 14 |
0x1d | 03 | 3 count |
| 15 |
0x1e | 01 | [func 1] type 1 |
| 16 |
0x1f | 01 | [func 2] type 1 |
| 17 |
0x20 | 01 | [func 3] type 1 |
| 18 |
0x21 | 04 04 | table section |
| 19 |
0x23 | 01 | 1 count |
| 20 |
0x24 | 70 00 01 | [table 0] Table { ty: TableType { element_type: funcref, table64: false, initial: 1, maximum: None, shared: false }, init: RefNull } |
| 21 |
0x27 | 05 03 | memory section |
| 22 |
0x29 | 01 | 1 count |
| 23 |
0x2a | 00 01 | [memory 0] MemoryType { memory64: false, shared: false, initial: 1, maximum: None, page_size_log2: None } |
| 24 |
0x2c | 06 06 | global section |
| 25 |
0x2e | 01 | 1 count |
| 26 |
0x2f | 7f 00 | [global 0] GlobalType { content_type: I32, mutable: false, shared: false } |
| 27 |
0x31 | 41 00 | i32_const value:0 |
| 28 |
0x33 | 0b | end |
| 29 |
0x34 | 07 05 | export section |
| 30 |
0x36 | 01 | 1 count |
| 31 |
0x37 | 01 6d 02 00 | export Export { name: "m", kind: Memory, index: 0 } |
| 32 |
0x3b | 08 01 | start section |
| 33 |
0x3d | 00 | start function 0 |
| 34 |
0x3e | 09 13 | element section |
| 35 |
0x40 | 03 | 3 count |
| 36 |
0x41 | 00 | element table[None] |
| 37 |
0x42 | 41 03 | i32_const value:3 |
| 38 |
0x44 | 0b | end |
| 39 |
0x45 | 01 | 1 items [indices] |
| 40 |
0x46 | 00 | item 0 |
| 41 |
0x47 | 05 70 01 | element passive, 1 items [exprs funcref] |
| 42 |
0x4a | d0 70 0b | item ConstExpr { offset: 74, data: [208, 112, 11] } |
| 43 |
0x4d | 07 70 01 | element declared 1 items [exprs funcref] |
| 44 |
0x50 | d0 70 0b | item ConstExpr { offset: 80, data: [208, 112, 11] } |
| 45 |
0x53 | 0a 10 | code section |
| 46 |
0x55 | 03 | 3 count |
| 47 |
============== func 1 ==================== |
| 48 |
0x56 | 02 | size of function |
| 49 |
0x57 | 00 | 0 local blocks |
| 50 |
0x58 | 0b | end |
| 51 |
============== func 2 ==================== |
| 52 |
0x59 | 04 | size of function |
| 53 |
0x5a | 01 | 1 local blocks |
| 54 |
0x5b | 01 7f | 1 locals of type I32 |
| 55 |
0x5d | 0b | end |
| 56 |
============== func 3 ==================== |
| 57 |
0x5e | 06 | size of function |
| 58 |
0x5f | 01 | 1 local blocks |
| 59 |
0x60 | 01 7f | 1 locals of type I32 |
| 60 |
0x62 | 41 00 | i32_const value:0 |
| 61 |
0x64 | 0b | end |
| 62 |
0x65 | 0b 0c | data section |
| 63 |
0x67 | 03 | 3 count |
| 64 |
0x68 | 00 | data memory[0] |
| 65 |
0x69 | 41 08 | i32_const value:8 |
| 66 |
0x6b | 0b | end |
| 67 |
0x6c |-------------| ... 1 bytes of data |
| 68 |
0x6e | 01 01 | data passive |
| 69 |
0x70 |-------------| ... 1 bytes of data |
| 70 |
0x71 | 01 00 | data passive |
| 71 |
0x73 |-------------| ... 0 bytes of data |
| 72 |
0x73 | 00 17 | custom section |
| 73 |
0x75 | 0f 6e 61 6d | name: "name-of-section" |
| 74 |
| 65 2d 6f 66 |
| 75 |
| 2d 73 65 63 |
| 76 |
| 74 69 6f 6e |
| 77 |
0x85 |-------------| ... 7 bytes of data |