File: simple.wast

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 48,492 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (42 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(component)

(component
  (core module)
)

(component
  (core module)
  (core module)
  (core module)
)

(component
  (core module
    (func (export "a") (result i32) i32.const 0)
    (func (export "b") (result i64) i64.const 0)
  )
  (core module
    (func (export "c") (result f32) f32.const 0)
    (func (export "d") (result f64) f64.const 0)
  )
)

(assert_invalid
  (component
    (import "a" (component))
  )
  "root-level component imports are not supported")

(assert_invalid
  (component
    (component (export "a"))
  )
  "exporting a component from the root component is not supported")

(component
  (core module $m (func (export "")))
  (core instance $m (instantiate $m))
  (func (export "a") (canon lift (core func $m "")))
)

(assert_return (invoke "a"))