From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:WebAssembly binary format" |
|---|
| claim | "The 8-byte preamble of a WebAssembly binary: u32 magic 0x6D736100 (bytes "\0asm"), u16 version, u16 layer (0 = core module with version 1, 1 = component). Sections follow directly; there is no total length or section count." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:WebAssembly binary format" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "wasm_preamble" |
|---|
| size | 8 |
|---|
| fields | | offset | 0 |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "magic" |
|---|
| notes | "0x6D736100, bytes 00 61 73 6D" |
|---|
|
| offset | 4 |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "version" |
|---|
| notes | "1 for core modules; 0x0D for pre-standard components" |
|---|
|
| offset | 6 |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "layer" |
|---|
| notes | "0 core module, 1 component" |
|---|
|
|
|---|
| endianness | "little" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "ReadU32 magic, ReadU16 version, ReadU16 layer, then ReadSections" |
|---|
| repo | "https://github.com/WebAssembly/wabt" |
|---|
| commit | "1e9fffd80efa901b3e4708d4ba1f0df972e63518" |
|---|
| path | "src/binary-reader.cc" |
|---|
| lines | "3283-3304" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "wasm_preamble" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T14:35:58.858Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T17:10:53.499Z" |
|---|
| summary | "Add data.endianness little: ReadModule uses ReadU32/ReadU16 (little-endian by the wasm spec); magic bytes 00 61 73 6D are the LE form of 0x6D736100. Re-read binary-reader.cc 3283-3304: magic…" |
|---|
| changed | |
|---|
|
|
|---|