-
Notifications
You must be signed in to change notification settings - Fork 5
/
imports_webassembly.go
44 lines (34 loc) · 1.01 KB
/
imports_webassembly.go
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
//go:build wasm || tinygo.wasm || wasi
// +build wasm tinygo.wasm wasi
package wapc
//go:wasm-module wapc
//go:export __guest_request
func guestRequest(operationPtr uintptr, payloadPtr uintptr)
//go:wasm-module wapc
//go:export __guest_response
func guestResponse(ptr uintptr, len uint32)
//go:wasm-module wapc
//go:export __guest_error
func guestError(ptr uintptr, len uint32)
//go:wasm-module wapc
//go:export __host_call
func hostCall(
bindingPtr uintptr, bindingLen uint32,
namespacePtr uintptr, namespaceLen uint32,
operationPtr uintptr, operationLen uint32,
payloadPtr uintptr, payloadLen uint32) bool
//go:wasm-module wapc
//go:export __host_response_len
func hostResponseLen() uint32
//go:wasm-module wapc
//go:export __host_response
func hostResponse(ptr uintptr)
//go:wasm-module wapc
//go:export __host_error_len
func hostErrorLen() uint32
//go:wasm-module wapc
//go:export __host_error
func hostError(ptr uintptr)
//go:wasm-module wapc
//go:export __console_log
func consoleLog(ptr uintptr, size uint32)