Navigation
Introduction
Structure
Validation
Execution
Binary Format
Text Format
Conventions
Lexical Format
Values
Types
Instructions
Modules
Appendix
Index of Types
Index of Instructions
Index of Semantic Rules
Index
Download as PDF
Quick search
Types
¶
Number Types
¶
numtype
::=
‘
i
32
’
⇒
i
32
|
‘
i
64
’
⇒
i
64
|
‘
f
32
’
⇒
f
32
|
‘
f
64
’
⇒
f
64
Vector Types
¶
vectype
::=
‘
v
128
’
⇒
v
128
Reference Types
¶
reftype
::=
‘
funcref
’
⇒
funcref
|
‘
externref
’
⇒
externref
heaptype
::=
‘
func
’
⇒
funcref
|
‘
extern
’
⇒
externref
Value Types
¶
valtype
::=
t
:
numtype
⇒
t
|
t
:
vectype
⇒
t
|
t
:
reftype
⇒
t
Function Types
¶
functype
::=
‘
(
’
‘
func
’
t
1
∗
:
vec
(
param
)
t
2
∗
:
vec
(
result
)
‘
)
’
⇒
[
t
1
∗
]
→
[
t
2
∗
]
param
::=
‘
(
’
‘
param
’
id
?
t
:
valtype
‘
)
’
⇒
t
result
::=
‘
(
’
‘
result
’
t
:
valtype
‘
)
’
⇒
t
Abbreviations
¶
Multiple anonymous parameters or results may be combined into a single declaration:
‘
(
’
‘
param
’
valtype
∗
‘
)
’
≡
(
‘
(
’
‘
param
’
valtype
‘
)
’
)
∗
‘
(
’
‘
result
’
valtype
∗
‘
)
’
≡
(
‘
(
’
‘
result
’
valtype
‘
)
’
)
∗
Limits
¶
limits
::=
n
:
u
32
⇒
{
min
n
,
max
ϵ
}
|
n
:
u
32
m
:
u
32
⇒
{
min
n
,
max
m
}
Memory Types
¶
memtype
::=
lim
:
limits
⇒
lim
Table Types
¶
tabletype
::=
lim
:
limits
et
:
reftype
⇒
lim
et
Global Types
¶
globaltype
::=
t
:
valtype
⇒
const
t
|
‘
(
’
‘
mut
’
t
:
valtype
‘
)
’
⇒
var
t