souprune_api
Current Status: 🚧 Early Development
souprune_api — FFI API definitions and bindings generator for SoupRune game framework.
| English | Simplified Chinese |
|---|---|
| English | 简体中文 |
Introduction
souprune_api is the FFI (Foreign Function Interface) layer for the SoupRune game framework.
It solves the problem of language interoperability, allowing users to interact with SoupRune from languages other than Rust (C#, Haxe, Lua, etc.).
With souprune_api, you only need to use the generated bindings in your target language to access SoupRune functionality.
In the future, it may also support dynamic plugin loading and hot-reloading.
Features
- FFI-safe API definitions for SoupRune
- Multi-language binding generation (C, C#, Haxe)
- Integration with Interoptopus for automatic code generation
- Type-safe cross-language communication
- (Planned) Plugin system support
- (Planned) Hot-reload capabilities
How to Use
-
Install Rust (if not already installed):
| -
Add to Cargo.toml:
[] = "0.1" -
Generate bindings (with bindgen feature):
This will generate:
- C header files
- C# bindings
- Haxe bindings
-
Use in your language:
See the generated binding files in the output directory for usage examples.
Dependencies
This project uses the following crates:
| Crate | Version | Description |
|---|---|---|
| interoptopus | 0.15.0-alpha.24 | FFI bindings framework |
| interoptopus_backend_c | 0.15.0-alpha.24 | C backend |
| interoptopus_backend_csharp | 0.15.0-alpha.24 | C# backend |
| interoptopus_backend_haxe | 0.0.1 | Haxe backend |
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
- GNU Lesser General Public License v3.0 or later (LICENSE or https://www.gnu.org/licenses/lgpl-3.0.html)