Skip to main content

Crate openstranded_plugin_api

Crate openstranded_plugin_api 

Source
Expand description

§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

§Feature flags

§WASM entry points

Every WASM plugin must export the following #[no_mangle] extern "C" functions:

ExportRequiredCalled during
plugin_api_version() -> ApiVersionYesLoad, before anything
plugin_build(ctx) -> Vec<Contribution>YesRegistry phase
plugin_ready(api) -> boolNoDiscovery phase
plugin_finish(api)NoIntegration phase

Modules§

test_utils

Structs§

ApiVersion
Version of openstranded-plugin-api baked at compile time.
Registry
All data from a Content Pack, grouped by domain (from manifest.toml).
RegistryEntry
A single file from a Content Pack, indexed in the Registry.
ResourceDecl
Describes a resource to be registered in the Bevy World.
ServiceRegistry
Host-side registry of all registered services.
SystemDecl
Describes a system to be added to a Bevy schedule.

Enums§

Contribution
Declarative interface from WASM plugin to Host.
LogLevel
Log severity level.
ServiceError
Errors that occur during Service API calls or Registry access.
Value
Dynamic type for Service API arguments and return values.
VersionMismatch
Version mismatch between a plugin and the engine.

Traits§

GameAPI
Host-side API surface provided to WASM plugins.
Service
Unified interface for cross-plugin calls.

Functions§

parse_registry_data
Parse raw .ron bytes into a Value tree.
parse_registry_list
Convenience wrapper: parse bytes as an array and return elements.