Skip to content

Commit 6d5d8c0

Browse files
committed
Add a bunch of missing 'core' prefixes to SharedEverythingDynamicLinking.md
1 parent da97679 commit 6d5d8c0

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

design/mvp/examples/SharedEverythingDynamicLinking.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,17 @@ would look like:
129129
```wasm
130130
;; zipper.wat
131131
(component
132-
(import "libc" (module $Libc
132+
(import "libc" (core module $Libc
133133
(export "memory" (memory 1))
134134
(export "malloc" (func (param i32) (result i32)))
135135
))
136-
(import "libzip" (module $Libzip
136+
(import "libzip" (core module $Libzip
137137
(import "libc" "memory" (memory 1))
138138
(import "libc" "malloc" (func (param i32) (result i32)))
139139
(export "zip" (func (param i32 i32 i32) (result i32)))
140140
))
141141
142-
(module $Main
142+
(core module $Main
143143
(import "libc" "memory" (memory 1))
144144
(import "libc" "malloc" (func (param i32) (result i32)))
145145
(import "libzip" "zip" (func (param i32 i32 i32) (result i32)))
@@ -149,16 +149,16 @@ would look like:
149149
)
150150
)
151151
152-
(instance $libc (instantiate (module $Libc)))
153-
(instance $libzip (instantiate (module $Libzip))
152+
(core instance $libc (instantiate (module $Libc)))
153+
(core instance $libzip (instantiate (module $Libzip))
154154
(with "libc" (instance $libc))
155155
))
156-
(instance $main (instantiate (module $Main)
156+
(core instance $main (instantiate (module $Main)
157157
(with "libc" (instance $libc))
158158
(with "libzip" (instance $libzip))
159159
))
160160
(func $zip (param (list u8)) (result (list u8)) (canon lift
161-
(func $main "zip")
161+
(core func $main "zip")
162162
(memory (core memory $libc "memory")) (realloc (func $libc "realloc"))
163163
))
164164
(export "zip" (func $zip))
@@ -210,11 +210,11 @@ component-aware `clang`, the resulting component would look like:
210210
```wasm
211211
;; imgmgk.wat
212212
(component $Imgmgk
213-
(import "libc" (module $Libc ...))
214-
(import "libzip" (module $Libzip ...))
215-
(import "libimg" (module $Libimg ...))
213+
(import "libc" (core module $Libc ...))
214+
(import "libzip" (core module $Libzip ...))
215+
(import "libimg" (core module $Libimg ...))
216216
217-
(module $Main
217+
(core module $Main
218218
(import "libc" "memory" (memory 1))
219219
(import "libc" "malloc" (func (param i32) (result i32)))
220220
(import "libimg" "compress" (func (param i32 i32 i32) (result i32)))
@@ -224,20 +224,20 @@ component-aware `clang`, the resulting component would look like:
224224
)
225225
)
226226
227-
(instance $libc (instantiate (module $Libc)))
228-
(instance $libzip (instantiate (module $Libzip)
227+
(core instance $libc (instantiate (module $Libc)))
228+
(core instance $libzip (instantiate (module $Libzip)
229229
(with "libc" (instance $libc))
230230
))
231-
(instance $libimg (instantiate (module $Libimg)
231+
(core instance $libimg (instantiate (module $Libimg)
232232
(with "libc" (instance $libc))
233233
(with "libzip" (instance $libzip))
234234
))
235-
(instance $main (instantiate (module $Main)
235+
(core instance $main (instantiate (module $Main)
236236
(with "libc" (instance $libc))
237237
(with "libimg" (instance $libimg))
238238
))
239239
(func $transform (param (list u8)) (result (list u8)) (canon lift
240-
(func $main "transform")
240+
(core func $main "transform")
241241
(memory (core memory $libc "memory")) (realloc (func $libc "realloc"))
242242
))
243243
(export "transform" (func $transform))
@@ -254,14 +254,14 @@ components. The resulting component could look like:
254254
```wasm
255255
;; app.wat
256256
(component
257-
(import "libc" (module $Libc ...))
258-
(import "libzip" (module $Libzip ...))
259-
(import "libimg" (module $Libimg ...))
257+
(import "libc" (core module $Libc ...))
258+
(import "libzip" (core module $Libzip ...))
259+
(import "libimg" (core module $Libimg ...))
260260
261261
(import "zipper" (component $Zipper ...))
262262
(import "imgmgk" (component $Imgmgk ...))
263263
264-
(module $Main
264+
(core module $Main
265265
(import "libc" "memory" (memory 1))
266266
(import "libc" "malloc" (func (param i32) (result i32)))
267267
(import "zipper" "zip" (func (param i32 i32) (result i32 i32)))
@@ -282,22 +282,22 @@ components. The resulting component could look like:
282282
(with "libimg" (module $Libimg))
283283
))
284284
285-
(instance $libc (instantiate (module $Libc)))
286-
(func $zip (canon lower
285+
(core instance $libc (instantiate (module $Libc)))
286+
(core func $zip (canon lower
287287
(func $zipper "zip")
288288
(memory (core memory $libc "memory")) (realloc (func $libc "realloc"))
289289
))
290-
(func $transform (canon lower
290+
(core func $transform (canon lower
291291
(func $imgmgk "transform")
292292
(memory (core memory $libc "memory")) (realloc (func $libc "realloc"))
293293
))
294-
(instance $main (instantiate (module $Main)
294+
(core instance $main (instantiate (module $Main)
295295
(with "libc" (instance $libc))
296296
(with "zipper" (instance (export "zip" (func $zipper "zip"))))
297297
(with "imgmgk" (instance (export "transform" (func $imgmgk "transform"))))
298298
))
299299
(func $run (param string) (result string) (canon lift
300-
(func $main "run")
300+
(core func $main "run")
301301
(memory (core memory $libc "memory")) (realloc (func $libc "realloc"))
302302
))
303303
(export "run" (func $run))
@@ -358,17 +358,17 @@ a wrapper adapter module that supplies both `$A` and `$B` with a shared
358358
function table and `bar-index` mutable global.
359359
```wat
360360
(component
361-
(import "A" (module $A ...))
362-
(import "B" (module $B ...))
363-
(module $Linkage
361+
(import "A" (core module $A ...))
362+
(import "B" (core module $B ...))
363+
(core module $Linkage
364364
(global (export "bar-index") (mut i32))
365365
(table (export "table") funcref 1)
366366
)
367-
(instance $linkage (instantiate (module $Linkage)))
368-
(instance $a (instantiate (module $A)
367+
(core instance $linkage (instantiate (module $Linkage)))
368+
(core instance $a (instantiate (module $A)
369369
(with "linkage" (instance $linkage))
370370
))
371-
(instance $b (instantiate (module $B)
371+
(core instance $b (instantiate (module $B)
372372
(import "a" (instance $a))
373373
(with "linkage" (instance $linkage))
374374
))

0 commit comments

Comments
 (0)