Skip to content

Commit

Permalink
special-case s8 and u8 in Binary.md
Browse files Browse the repository at this point in the history
Special case `s8` and `u8` to ensure that exactly 1 byte is used
to represent values of those types

#336 (comment)

Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs authored and lukewagner committed Jun 3, 2024
1 parent 4480daf commit 0206d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions design/mvp/Binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ Notes:
value ::= t:<valtype> v:<val(t)> => (value t v)
val(bool) ::= 0x00 => false
| 0x01 => true
val(u8) ::= v:<core:u8> => v
val(s8) ::= v:<core:s8> => v
val(u8) ::= v:<core:byte> => v
val(s8) ::= v:<core:byte> => v if v < 128 else (v - 256)
val(s16) ::= v:<core:s16> => v
val(u16) ::= v:<core:u16> => v
val(s32) ::= v:<core:s32> => v
Expand Down

0 comments on commit 0206d46

Please sign in to comment.