-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.lisp
149 lines (146 loc) · 2.96 KB
/
package.lisp
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
(defpackage #:cl-wasm-runtime
(:nicknames #:wasm-rt)
(:use #:cl)
(:export #:wasm-object
#:wasm-delete
#:null?)
;; Generic functiodns
(:export #:size
#:value
#:data-aref
#:to-list
#:from-list
#:kind)
;; Bytes
(:export #:wasm-byte
#:wasm-byte-vec
#:wasm-byte-vec-to-string
#:wasm-byte-vec-to-octets
#:string-to-wasm-byte-vec
#:octets-to-wasm-byte-vec)
;; Config
(:export #:wasm-config
#:make-wasm-config)
;; Engine
(:export #:wasm-engine
#:make-wasm-engine)
;; Store
(:export #:wasm-store
#:make-wasm-store)
;; Value Types
(:export #:wasm-valtype
#:make-wasm-valtype
#:value-type
#:reference?
#:number?)
;; Function Types
(:export #:wasm-functype
#:make-wasm-functype
#:params
#:results)
;; Global Types
(:export #:wasm-globaltype
#:make-wasm-globaltype
#:mutable?
#:value)
;; Table Types
(:export #:wasm-tabletype
#:make-wasm-tabletype)
;; Memory Types
(:export #:wasm-limits
#:make-wasm-limits
#:minimum
#:maximum
#:wasm-memorytype
#:make-wasm-memorytype
#:limits)
;; Extern Types
(:export #:wasm-externtype
#:extern-type
#:to-wasm-extern-type
#:to-wasm-func-type
#:to-wasm-memory-type
#:to-wasm-global-type
#:to-wasm-table-type)
;; Import Types
(:export #:wasm-importtype
#:make-wasm-importtype
#:namespace)
;; Export Types
(:export #:wasm-exporttype
#:make-wasm-exporttype)
;; References
(:export #:wasm-ref)
;; Values
(:export #:wasm-val
#:wasm-val-vec
#:make-wasm-val)
;; Frames
(:export #:wasm-frame
#:func-index
#:func-offset
#:func-module
#:wasm-frame-vec)
;; Traps
(:export #:wasm-trap
#:make-wasm-trap
#:message
#:origin
#:trap-trace
#:wasm-trap-error
#:wasm-trap-error-message
#:wasm-trap-error-origin
#:wasm-trap-error-trace)
;; Foreign Objects
(:export #:wasm-foreign)
;; Modules
(:export #:wasm-module
#:make-wasm-module
#:serialize
#:deserialize
#:load-wasm
#:load-wasm-module)
;; Function Instances
(:export #:wasm-func
#:make-wasm-func
#:wasm-func-error
#:wasm-funcall
#:param-arity
#:result-arity)
;; Global Instances
(:export #:wasm-global
#:make-wasm-global
#:global-type)
;; Table Instances
(:export #:wasm-table)
;; Memory Instances
(:export #:wasm-memory
#:make-wasm-memory
#:wasm-memory-buffer
#:buffer-aref
#:buffer-to-octets
#:buffer-to-string
#:bytes
#:buffer
#:buffer-size
#:grow
#:memory-type)
;; Externals
(:export #:wasm-extern
#:wasm-extern-as-func)
;; Module Instances
(:export #:wasm-imports
#:make-wasm-imports
#:make-wasm-namespace
#:make-wasm-import
#:import-modules
#:name
#:extern
#:imports
#:exports
#:get-export
#:wasm-instance
#:make-wasm-instance)
;; WAT
(:export #:wat-to-wasm
#:wat-to-wasm-module))