Skip to content

Commit 2c77edb

Browse files
committed
document (binary ...) expression
Signed-off-by: Roman Volosatovs <[email protected]>
1 parent 82a66f8 commit 2c77edb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

design/mvp/Explainer.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,13 @@ val ::= false | true
13891389
f64canon ::= <core:f64> without the `nan:0x` case.
13901390
```
13911391

1392-
The validation rules for `value` require the `val` to match the `valtype`. For example:
1392+
The validation rules for `value` require the `val` to match the `valtype`.
1393+
1394+
`(binary ...)` expression provides an alternative syntax allowing the binary contents
1395+
of the value definition to be written directly in the text format, analogous to data segments,
1396+
avoiding the need to understand type information when encoding or decoding.
1397+
1398+
For example:
13931399
```wasm
13941400
(component
13951401
(value $a bool true)

0 commit comments

Comments
 (0)