@@ -9,20 +9,23 @@ we start by defining them.
99
1010## WebAssembly Core modules
1111
12+ A module is defined by the [ WebAssembly Core Specification] ( https://webassembly.github.io/spec/core/ ) .
13+
1214WebAssembly programs can be written by hand,
1315but it's more likely that you will use a compiler to generate your programs.
1416In general, a compiler translates programs from a source language
1517to a target language.
1618Compilers whose target language is WebAssembly may take
1719Rust, C, Go, or a variety of other languages as a source language.
18- In this case, the compiler produces a WebAssembly _ core module_ .
19-
20- Typically, a core module defines a set of _ functions_
21- along with auxiliary definitions
22- that are necessary for executing those functions.
23- Functions are made up of _ instructions_ .
24- Auxiliary definitions include:
25- * _ Linear memories_ define untyped buffers that can be read from
20+ In this case, the compiler produces a WebAssembly [ core module] ( https://webassembly.github.io/spec/core/syntax/modules.html ) .
21+
22+ A core module is a set of definitions.
23+ Kinds of definitions include:
24+ * _ Functions_ define executable units of code
25+ (sequences of instructions along with declarations
26+ for argument names and types and return types).
27+ * [ _ Linear memories_ ] ( https://webassembly.github.io/spec/core/syntax/modules.html#syntax-mem )
28+ define buffers of uninterpreted bytes that can be read from
2629 and written to by instructions.
2730* _ Imports_ define the names of other modules
2831 that are required to be available to execute
@@ -34,13 +37,11 @@ Auxiliary definitions include:
3437* And others; see [ the Core Specification] ( https://webassembly.github.io/spec/core/syntax/modules.html )
3538 for the complete list.
3639
37- A core module usually corresponds to a single ` .wasm ` file.
40+ A core module usually corresponds to a single binary ` .wasm ` file.
3841These modules can be run in the browser,
3942or via a separate runtime such as [ Wasmtime] ( https://wasmtime.dev/ )
4043or [ WAMR] ( https://github.com/bytecodealliance/wasm-micro-runtime ) .
4144
42- A module is defined by the [ WebAssembly Core Specification] ( https://webassembly.github.io/spec/core/ ) .
43-
4445### Limitations of core modules
4546
4647Core modules are, however, limited in how they expose their functionality to the outside world.
0 commit comments