Skip to main content

Crate souprune_api

Crate souprune_api 

Source
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§

BulletContext
Bullet context passed to danmaku callbacks, mirrors the WIT bullet-context record.
BulletOutput
Output from a danmaku on-update call, mirrors the WIT bullet-output record.
PatternParam
Named parameter for spawn patterns, mirrors the WIT pattern-param record.
Prop
Named property for danmaku behaviors, mirrors the WIT prop record.
SpawnContext
Context for spawn pattern generation, mirrors the WIT spawn-context record.
SpawnPoint
A computed spawn point, mirrors the WIT spawn-point record.
Vec2
2D vector, mirrors the WIT vec2 record.

Enums§

Action
Semantic input action, mirrors the WIT action enum.

Functions§

wit_dir
Returns the path to the WIT directory shipped with this crate.