Skip to content

Commit db62dc8

Browse files
rvolosatovslukewagner
authored andcommitted
document (binary ...) expression
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
1 parent 0ab2379 commit db62dc8

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
@@ -1382,7 +1382,13 @@ val ::= false | true
13821382
f64canon ::= <core:f64> without the `nan:0x` case.
13831383
```
13841384

1385-
The validation rules for `value` require the `val` to match the `valtype`. For example:
1385+
The validation rules for `value` require the `val` to match the `valtype`.
1386+
1387+
`(binary ...)` expression provides an alternative syntax allowing the binary contents
1388+
of the value definition to be written directly in the text format, analogous to data segments,
1389+
avoiding the need to understand type information when encoding or decoding.
1390+
1391+
For example:
13861392
```wasm
13871393
(component
13881394
(value $a bool true)

0 commit comments

Comments
 (0)