wasm-tools 1.248.0

CLI tools for interoperating with WebAssembly files
Documentation
  0x0 | 00 61 73 6d | version 1 (Module)
      | 01 00 00 00
  0x8 | 01 08       | type section
  0xa | 02          | 2 count
--- rec group 0 (implicit) ---
  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, descriptor_idx: None, describes_idx: None } }
--- rec group 1 (implicit) ---
  0xf | 60 00 00    | [type 1] SubType { is_final: true, supertype_idx: None, composite_type: CompositeType { inner: Func(FuncType { params: [], results: [] }), shared: false, descriptor_idx: None, describes_idx: None } }
 0x12 | 02 07       | import section
 0x14 | 01          | 1 count
 0x15 | 01 6d 01 6e | import [func 0] Import { module: "m", name: "n", ty: Func(0) }
      | 00 00      
 0x1b | 03 04       | func section
 0x1d | 03          | 3 count
 0x1e | 01          | [func 1] type 1
 0x1f | 01          | [func 2] type 1
 0x20 | 01          | [func 3] type 1
 0x21 | 04 04       | table section
 0x23 | 01          | 1 count
 0x24 | 70 00 01    | [table 0] Table { ty: TableType { element_type: funcref, table64: false, initial: 1, maximum: None, shared: false }, init: RefNull }
 0x27 | 05 03       | memory section
 0x29 | 01          | 1 count
 0x2a | 00 01       | [memory 0] MemoryType { memory64: false, shared: false, initial: 1, maximum: None, page_size_log2: None }
 0x2c | 06 06       | global section
 0x2e | 01          | 1 count
 0x2f | 7f 00       | [global 0] GlobalType { content_type: I32, mutable: false, shared: false }
 0x31 | 41 00       | i32_const value:0
 0x33 | 0b          | end
 0x34 | 07 05       | export section
 0x36 | 01          | 1 count
 0x37 | 01 6d 02 00 | export Export { name: "m", kind: Memory, index: 0 }
 0x3b | 08 01       | start section
 0x3d | 00          | start function 0
 0x3e | 09 13       | element section
 0x40 | 03          | 3 count
 0x41 | 00          | element table[None]
 0x42 | 41 03       | i32_const value:3
 0x44 | 0b          | end
 0x45 | 01          | 1 items [indices]
 0x46 | 00          | item 0
 0x47 | 05 70 01    | element passive, 1 items [exprs funcref]
 0x4a | d0 70 0b    | item ConstExpr { offset: 74, data: [208, 112, 11] }
 0x4d | 07 70 01    | element declared 1 items [exprs funcref]
 0x50 | d0 70 0b    | item ConstExpr { offset: 80, data: [208, 112, 11] }
 0x53 | 0a 10       | code section
 0x55 | 03          | 3 count
============== func 1 ====================
 0x56 | 02          | size of function
 0x57 | 00          | 0 local blocks
 0x58 | 0b          | end
============== func 2 ====================
 0x59 | 04          | size of function
 0x5a | 01          | 1 local blocks
 0x5b | 01 7f       | 1 locals of type I32
 0x5d | 0b          | end
============== func 3 ====================
 0x5e | 06          | size of function
 0x5f | 01          | 1 local blocks
 0x60 | 01 7f       | 1 locals of type I32
 0x62 | 41 00       | i32_const value:0
 0x64 | 0b          | end
 0x65 | 0b 0c       | data section
 0x67 | 03          | 3 count
 0x68 | 00          | data memory[0]
 0x69 | 41 08       | i32_const value:8
 0x6b | 0b          | end
 0x6c |-------------| ... 1 bytes of data
 0x6e | 01 01       | data passive
 0x70 |-------------| ... 1 bytes of data
 0x71 | 01 00       | data passive
 0x73 |-------------| ... 0 bytes of data
 0x73 | 00 17       | custom section
 0x75 | 0f 6e 61 6d | name: "name-of-section"
      | 65 2d 6f 66
      | 2d 73 65 63
      | 74 69 6f 6e
 0x85 |-------------| ... 7 bytes of data