openstranded-common-wasmcontract 0.2.0

OpenStranded WASM contract types — shared between engine and plugin-api
Documentation

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 crossing
  • thiserror — typed error handling
  • ron (optional, behind parse feature) — registry data parsing

Feature flags

  • parse (default): enables parse_registry_data and parse_registry_list
  • std (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