wapc/
wapc_functions.rs

1//! A list of the function names that are part of each waPC conversation
2
3// -- Functions called by guest, exported by host
4/// The waPC protocol function `__console_log`
5pub const HOST_CONSOLE_LOG: &str = "__console_log";
6/// The waPC protocol function `__host_call`
7pub const HOST_CALL: &str = "__host_call";
8/// The waPC protocol function `__guest_request`
9pub const GUEST_REQUEST_FN: &str = "__guest_request";
10/// The waPC protocol function `__host_response`
11pub const HOST_RESPONSE_FN: &str = "__host_response";
12/// The waPC protocol function `__host_response_len`
13pub const HOST_RESPONSE_LEN_FN: &str = "__host_response_len";
14/// The waPC protocol function `__guest_response`
15pub const GUEST_RESPONSE_FN: &str = "__guest_response";
16/// The waPC protocol function `__guest_error`
17pub const GUEST_ERROR_FN: &str = "__guest_error";
18/// The waPC protocol function `__host_error`
19pub const HOST_ERROR_FN: &str = "__host_error";
20/// The waPC protocol function `__host_error_len`
21pub const HOST_ERROR_LEN_FN: &str = "__host_error_len";
22
23// -- Functions called by host, exported by guest
24/// The waPC protocol function `__guest_call`
25pub const GUEST_CALL: &str = "__guest_call";
26/// The waPC protocol function `wapc_init`
27pub const WAPC_INIT: &str = "wapc_init";
28/// The waPC protocol function `_start`
29pub const TINYGO_START: &str = "_start";
30
31/// Start functions to attempt to call - order is important
32pub const REQUIRED_STARTS: [&str; 2] = [TINYGO_START, WAPC_INIT];