| Crates.io | mitoxide-wasm |
| lib.rs | mitoxide-wasm |
| version | 0.1.0 |
| created_at | 2025-10-16 15:58:53.053722+00 |
| updated_at | 2025-10-16 15:58:53.053722+00 |
| description | WASM runtime support for Mitoxide |
| homepage | https://github.com/yourusername/mitoxide |
| repository | https://github.com/yourusername/mitoxide |
| max_upload_size | |
| id | 1886349 |
| size | 35,087 |
WebAssembly runtime support for Mitoxide - enabling secure remote execution of WASM modules.
This crate is primarily used internally by Mitoxide, but can be used standalone for WASM execution.
use mitoxide_wasm::{WasmRuntime, WasmModule};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let runtime = WasmRuntime::new()?;
// Load WASM module
let module_bytes = std::fs::read("module.wasm")?;
let module = WasmModule::from_bytes(&module_bytes)?;
// Execute with JSON input
let input = serde_json::json!({"message": "Hello, WASM!"});
let result = runtime.execute(&module, &input).await?;
println!("Result: {}", result);
Ok(())
}
The WASM runtime provides sandboxed execution with:
This project is licensed under the MIT License.