unity.rs, unreal.rs, wasm.rs — Engine Integration Bindings
Oxyde provides dedicated modules for embedding agents in game engines and runtime environments. These enable seamless interaction between native Rust logic and the external environment.
🎮 unity.rs — Unity Binding
unity.rs — Unity BindingProvides a simple bridge between Unity (C#) and the Rust agent core via FFI.
🧩 Unity Setup
C# script
OxydeAgent.cswraps native calls via[DllImport]Unity scene listens for
.SendInput(string)and emits output via eventCan be used with dialogue UI, character triggers, or world events
🔧 Key Functions
#[no_mangle]
pub extern "C" fn agent_input(ptr: *const c_char) -> *mut c_charInput/Output via C-compatible strings Memory safely managed on Rust side
🧬 unreal.rs — Unreal Engine Binding
unreal.rs — Unreal Engine BindingIntegrates with C++/Blueprints in Unreal Engine.
🛠️ Unreal Setup
C++ class
UOxydeAgentComponentBinds to gameplay input/output
Blueprint events for receiving responses
🧩 Key API Methods
void SendInput(FString PlayerInput);
FString GetLastResponse();Non-blocking async supported Event-driven output for seamless narrative pacing
🌐 wasm.rs — WebAssembly Runtime
wasm.rs — WebAssembly RuntimeEnables in-browser agents using wasm32-unknown-unknown.
💻 Use Cases
Visual novel games
Web demos
Agent playgrounds for experimentation
🔗 JS Integration
Exports oxyde_input() and oxyde_response() via wasm-bindgen.
const output = await oxyde_input("What do you remember?");Load from CDN or local bundle. Persistent memory WIP.
🔮 Future Extensions
Multiplayer RPC support (shared memory / server)
WebSocket bridge
Bidirectional state sync with engine (emotion → animation)
