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
//! Shared name constants for strings that cross the component/core
//! boundary where two sides must agree on an exact literal.
//!
//! **Not in scope here:** anything derived from the tier-1 WIT file.
//! That includes:
//!
//! - The middleware's hook function names (`before-call`, `after-call`,
//! `should-block-call`) — available as `TIER1_BEFORE_FNS` /
//! `TIER1_AFTER_FNS` / `TIER1_BLOCKING_FNS` in [`crate::contract`].
//! - Their underscored env-slot counterparts (`before_call`, etc.) —
//! available as `TIER1_BEFORE_ENV_SLOTS` / `TIER1_AFTER_ENV_SLOTS` /
//! `TIER1_BLOCKING_ENV_SLOTS` in [`crate::contract`], generated by
//! `build.rs` from the same WIT source with hyphens replaced by
//! underscores.
pub const ENV_INSTANCE: &str = "env";
pub const ENV_MEMORY: &str = "mem";
pub const ENV_REALLOC: &str = "realloc";
pub const ENV_WAITABLE_NEW: &str = "waitable_new";
pub const ENV_WAITABLE_JOIN: &str = "waitable_join";
pub const ENV_WAITABLE_WAIT: &str = "waitable_wait";
pub const ENV_WAITABLE_DROP: &str = "waitable_drop";
pub const ENV_SUBTASK_DROP: &str = "subtask_drop";
/// Per-function handler import/export name. `i` is the index of the
/// function in `funcs` (parallel to [`super::func::AdapterFunc`]).
pub
/// Per-function `task.return` import/export name. `i` matches
/// [`env_handler_fn`].
pub