Skip to content

Ignore and skip all unknown sections. #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions BinaryEncoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,26 @@ stored to from dedicated instructions.
| type | `uint8` | the type of the global, as a memory type |
| exported | `uint8` | a boolean indicating whether the global variable is exported |

### WorkInProgress: WLL section
### All other sections

These sections can occur in any order and multiple times.

| Field | Type | Description |
| ----- | ----- | ----- |
| id = `0x11` | `uint8` | section identifier for globals |
| size | `varuint32` | size of this section in bytes |
| id | `uint8` | section identifier |
| size | `uint32` | size of this section in bytes excluding this size |
| body | `bytes` | contents of this section |

The section size is a fixed width to support back patching.

#### Known external section IDs.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't need to enumerate known external section IDs if unknown sections are ignored per #552


The IDs are expected to be replaced by strings, and this table may be managed elsewhere in future.

| Id | Description |
|----|-------------|
| 0x11 | Web Low-level Language, [WLLang/WebLL](https://wllang.com/) |

# AST Encoding

Function bodies consist of a dense pre-order encoding of an [Abstract Syntax Tree](AstSemantics.md).
Expand Down