| Crates.io | wit-bindgen-wcl |
| lib.rs | wit-bindgen-wcl |
| version | 0.2.2 |
| created_at | 2025-10-01 16:29:41.824251+00 |
| updated_at | 2025-12-10 15:47:52.376371+00 |
| description | Runtime-agnostic WebAssembly Component Model implementation |
| homepage | https://github.com/HemantKArya/waclay |
| repository | https://github.com/HemantKArya/waclay |
| max_upload_size | |
| id | 1862898 |
| size | 89,339 |
WIT Binding Generator for waclay - Transform WIT interfaces into beautiful, type-safe Rust code.
⚠️ Experimental Warning: This tool is still experimental. Some features may work perfectly, others may not. It needs developer contributions to become stable.
wit-bindgen-wcl turns verbose WebAssembly Component Model code into clean, idiomatic Rust. Only works with waclay - purpose-built for the runtime-agnostic architecture.
Before (manual):
// 50+ lines of error-prone boilerplate...
let host_interface = linker.define_instance("example:demo/logger".try_into().unwrap()).unwrap();
host_interface.define_func("log", Func::new(&mut store, FuncType::new([ValueType::String], []), /* ... */))?;
After (generated):
impl LoggerHost for MyHost {
fn log(&mut self, message: String) { println!("{}", message); }
}
imports::register_loggerHost(&mut linker, &mut store)?;
# Install
cargo install wit-bindgen-wcl
# Generate bindings
wit-bindgen-wcl my-interface.wit bindings.rs
# Use in code
mod bindings;
use bindings::*;
Nine real-world examples in examples/:
# Test all examples
./test-wit-bindgen.ps1
Help us add resources, flags, and more WIT features!
Apache-2.0