openstranded-common-wasmcontract
Shared WASM contract types for the OpenStranded engine and plugin SDK.
Part of the OpenStranded project. Published on crates.io.
Types
| Type | Purpose |
|---|---|
Value |
Dynamic type for cross-plugin arguments and return values |
ServiceError |
Typed errors for Service API calls |
Service |
Cross-plugin method call interface (trait) |
Registry |
In-memory content pack data store |
RegistryEntry |
A single file from a content pack (DTO) |
GameAPI |
Host-side API surface provided to plugins |
Contribution |
Declarative output from WASM plugin build() phase |
ApiVersion |
Compile-time baked version for compatibility checks |
LogLevel |
Log severity level |
Dependencies
serde— serialisation for WASM boundary crossingthiserror— typed error handlingron(optional, behindparsefeature) — registry data parsing
Feature flags
parse(default): enablesparse_registry_dataandparse_registry_liststd(default): enables types requiring the standard library
Crate relationships
openstranded (engine) ──┐
├── openstranded-common-wasmcontract
openstranded-plugin-api ──┘
Both the engine and plugin-api depend on this crate for shared types.
The plugin-api crate re-exports everything and adds test utilities
(MockGameAPI) and WASM entry point stubs.
License
GPL-3.0-or-later