Expand description
WIT interface definitions for the SoupRune mod system.
This crate hosts the WIT (WebAssembly Interface Types) file that defines the
contract between Host (game engine) and Guest (mod). The WIT source lives in
wit/souprune-mod.wit and is consumed by both wasmtime::component::bindgen!
(host side) and wit_bindgen::generate! (guest side).
Additionally, shared plain-Rust types that mirror WIT records are provided here so that engine code which does not link against wasmtime can still work with the same data shapes.
SoupRune 模组系统的 WIT 接口定义。
WIT 源文件位于 wit/souprune-mod.wit,由宿主侧和客体侧共同使用。
Structs§
- Bullet
Context - Bullet context passed to danmaku callbacks, mirrors the WIT
bullet-contextrecord. - Bullet
Output - Output from a danmaku on-update call, mirrors the WIT
bullet-outputrecord. - Pattern
Param - Named parameter for spawn patterns, mirrors the WIT
pattern-paramrecord. - Prop
- Named property for danmaku behaviors, mirrors the WIT
proprecord. - Spawn
Context - Context for spawn pattern generation, mirrors the WIT
spawn-contextrecord. - Spawn
Point - A computed spawn point, mirrors the WIT
spawn-pointrecord. - Vec2
- 2D vector, mirrors the WIT
vec2record.
Enums§
- Action
- Semantic input action, mirrors the WIT
actionenum.
Functions§
- wit_dir
- Returns the path to the WIT directory shipped with this crate.