@@ -7,7 +7,7 @@ and by removing potentially error-prone ways for modules to interact.
77To understand what the limitations of core modules are,
88we start by defining them.
99
10- ## WebAssembly Core modules
10+ ## WebAssembly core modules
1111
1212A 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,
5959such as strings, lists, arrays, enums (enumerations), or structs (records),
6060have 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
6665and 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
6869In pseudocode, a type signature for a string-manipulating function
6970might look like:
@@ -120,6 +121,7 @@ remove-duplicates: func(s: string) -> string
120121
121122and dispense with the memory exports and imports altogether.
122123
124+ The complexity doesn't stop there!
123125Data representations are frequently specific to each programming language.
124126For example, a string in C is represented entirely differently
125127from a string in Rust or in JavaScript.
0 commit comments