Skip to content

Commit 0c2edc5

Browse files
committed
Integrate review feedback into 'WebAssembly core modules' section
1 parent 9f86658 commit 0c2edc5

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

component-model/src/design/why-component-model.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
1214
WebAssembly programs can be written by hand,
1315
but it's more likely that you will use a compiler to generate your programs.
1416
In general, a compiler translates programs from a source language
1517
to a target language.
1618
Compilers whose target language is WebAssembly may take
1719
Rust, 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.
3841
These modules can be run in the browser,
3942
or via a separate runtime such as [Wasmtime](https://wasmtime.dev/)
4043
or [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

4647
Core modules are, however, limited in how they expose their functionality to the outside world.

0 commit comments

Comments
 (0)