Skip to content

Commit bfe929b

Browse files
committed
Review feedback in 'Limitations of core modules' section
1 parent 6314db1 commit bfe929b

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and by removing potentially error-prone ways for modules to interact.
77
To understand what the limitations of core modules are,
88
we start by defining them.
99

10-
## WebAssembly Core modules
10+
## WebAssembly core modules
1111

1212
A module is defined by the [WebAssembly Core Specification](https://webassembly.github.io/spec/core/).
1313

@@ -59,11 +59,12 @@ Compound types common in higher-level programming languages,
5959
such as strings, lists, arrays, enums (enumerations), or structs (records),
6060
have to be represented in terms of integers and floating-point numbers.
6161

62-
Recall that a linear memory is an uninitialized region of bytes
63-
declared within a module.
64-
So, a string argument might be represented as two separate arguments:
65-
an integer offset into a memory,
62+
For example, for a function to accept a string, the string argument
63+
might be represented as two separate arguments:
64+
an integer offset into a memory
6665
and an integer representing the length of the string.
66+
Recall that a (linear) memory is an uninitialized region of bytes
67+
declared within a module.
6768

6869
In pseudocode, a type signature for a string-manipulating function
6970
might look like:
@@ -120,6 +121,7 @@ remove-duplicates: func(s: string) -> string
120121

121122
and dispense with the memory exports and imports altogether.
122123

124+
The complexity doesn't stop there!
123125
Data representations are frequently specific to each programming language.
124126
For example, a string in C is represented entirely differently
125127
from a string in Rust or in JavaScript.

0 commit comments

Comments
 (0)