or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Wasm split
Since this is largely about size efficiency we will only define this splitting for binary forms (not WAT).
Design goals:
Candidate splits
Proposal
Split algorithm
Taking binary Wasm as input:
Digest calculation algorithm
Digest calculation is a variation of the split algorithm which requires all possible (recursive) section splits to be performed. Split contents do not need to be stored, just included in recursive digest calculations.
Splice algorithm
Taking binary Wasm as input:
Typed hash digest
Content is hashed using a supported hash algorithm to produce a content digest. This is encoded along with an identifier of the hash algorithm:
For split sections with optional splitting of inner sections/segments, the
typeddigest
must be computed "as if" all allowed splitting has been done.Split section
sectionid
andsectionsize
record the original section's id and sizeComponent
Core module
Custom
customname
is copied from the original custom section'sname
Data
datasegmentsplitopt
allows a splitting implementation to leave a data segment inline (segmentdata
) but may not be used when calculating digests for the parent core module.segmentheader
records the original data segment's "header": the segment type and any other fields that come before the actual segment's data. This allows the splice algorithm to mechanically reconstruct segments without "knowing" about segment typessegmentdatasize
andsegmentdatadigest
record the original segment data's size and digestOther thoughts
MIME Types
You could think of "split" Wasm as just another kind of binary Wasm with particular features, in which case it could be covered by the existing
application/wasm
type. However, it may be useful to allow consumers to differentiate between "split" and "unsplit" forms. We could specify a separate type (e.g.application/split+wasm
) or a parameter (e.g.application/wasm; split=1
) to distinguish between them.