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
//! # openstranded-plugin-api
//!
//! Plugin SDK for `OpenStranded` — the core types and traits that all
//! WASM game plugins use to communicate with the engine and each other.
//!
//! ## Core types
//!
//! - [`Value`]: dynamic type for cross-plugin arguments and return values
//! - [`ServiceError`]: typed errors for Service API calls
//! - [`Service`] + [`ServiceRegistry`]: cross-plugin method call interface
//! - [`Registry`] + [`RegistryEntry`]: in-memory content pack data
//! - [`GameAPI`]: host-side API surface provided to plugins
//! - [`Contribution`]: declarative output from WASM plugin `build()` phase
//! - [`ApiVersion`]: compile-time baked version for compatibility checks
//!
//! ## Feature flags
//!
//! - `ron` (default): enables [`parse_registry_data`] and [`parse_registry_list`]
//! - `test-utils`: enables `MockGameAPI` for testing
//!
//! ## WASM entry points
//!
//! Every WASM plugin must export the following `#[no_mangle] extern "C"` functions:
//!
//! | Export | Required | Called during |
//! |--------|----------|---------------|
//! | `plugin_api_version() -> ApiVersion` | Yes | Load, before anything |
//! | `plugin_build(ctx) -> Vec<Contribution>` | Yes | Registry phase |
//! | `plugin_ready(api) -> bool` | No | Discovery phase |
//! | `plugin_finish(api)` | No | Integration phase |
// ── Re-exports ─────────────────────────────────────────────────────
pub use Value;
pub use ServiceError;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;