souprune_api 0.2.0

WIT interface definitions for SoupRune mod system
Documentation
  • Coverage
  • 24%
    12 out of 50 items documented0 out of 12 items with examples
  • Size
  • Source code size: 26.44 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.29 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 17s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Bli-AIk/souprune
    15 2 6
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Bli-AIk

souprune_api

license

Current Status: 🚧 Early Development

souprune_api — WIT interface definitions and shared types for the SoupRune mod system.

English Simplified Chinese
English įŽ€äŊ“中文

Introduction

souprune_api defines the contract between the SoupRune engine (host) and WASM mod components (guests) using WIT (WebAssembly Interface Types). It provides shared Rust types used by both the host runtime and the guest SDK (souprune_sdk).

Features

  • WIT interface definition (wit/souprune-mod.wit) — single source of truth
  • Shared Rust types: Vec2, BulletContext, BulletOutput, Action
  • Host-side: used by souprune (wasmtime) to define imports
  • Guest-side: used by souprune_sdk (wit-bindgen) to implement exports

WIT Interface

The WIT file defines three interfaces:

  • host-api (imported by guest): log, get-fact, set-fact, emit-event
  • behavior (exported by guest): on-init, on-update, on-interact
  • danmaku (exported by guest): init-bullet, update-bullet

How to Use

For host development (engine side), add to Cargo.toml:

[dependencies]
souprune_api = { path = "../souprune_api" }

For mod development (guest side), use souprune_sdk which re-exports the necessary types.

Warning

âš ī¸ This is an early development release.

  • API is unstable and may change significantly
  • Limited documentation
  • Not recommended for production use
  • Breaking changes expected in future versions

Contributing

Contributions are welcome! Whether you want to fix a bug, add a feature, or improve documentation:

  • Submit an Issue or Pull Request.
  • Share ideas and discuss design or architecture.

License

This project is licensed under