#component-model #wit-component #wasm-bindings #wasm-component-model #generator #generate-bindings

no-std wit-bindgen

Rust bindings generator and runtime support for WIT and the component model. Used when compiling Rust programs to the component model

55 breaking releases

Uses new Rust 2024

new 0.57.1 Apr 17, 2026
0.56.0 Apr 14, 2026
0.54.0 Mar 16, 2026
0.50.0 Dec 23, 2025
0.0.0 Nov 16, 2021

#5 in WebAssembly

Download history 955675/week @ 2025-12-27 1902530/week @ 2026-01-03 2170936/week @ 2026-01-10 2313048/week @ 2026-01-17 2486774/week @ 2026-01-24 2571164/week @ 2026-01-31 2891781/week @ 2026-02-07 2805406/week @ 2026-02-14 3031746/week @ 2026-02-21 3775001/week @ 2026-02-28 4195484/week @ 2026-03-07 4080553/week @ 2026-03-14 3635223/week @ 2026-03-21 3564094/week @ 2026-03-28 3776078/week @ 2026-04-04 4281776/week @ 2026-04-11

15,902,766 downloads per month
Used in 56,859 crates (151 directly)

Apache-2.0…

225KB
3K SLoC

Contains (static library, 1KB) src/rt/libwit_bindgen_cabi.a

wit-bindgen

Guest Rust language bindings generator for WIT and the Component Model

A Bytecode Alliance project

supported rustc stable Documentation Status

About

This crate provides a macro, generate!, to automatically generate Rust bindings for a WIT world. For more information about this crate see the online documentation which includes some examples and longer form reference documentation as well.

This crate is developed as a portion of the wit-bindgen repository which also contains a CLI and generators for other languages.

License

This project is licensed under the Apache 2.0 license with the LLVM exception. See LICENSE for more details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

Dependencies

~0–1.2MB
~24K SLoC