alexcrichton opened PR #5317 from merge-wit-bindgen to main:
This PR represents merging the
wit-bindgen-gen-host-wasmtime-rustcrate from thewit-bindgenrepository into this repository. This is made possible by recent infrastructural work around movement of the dependencies involved here, and this is the final process of extracting the macro to this repository. This commit creates abindgen!macro in thewasmtime::componentsubmodule. which is thewit_bindgen_host_wasmtime_rust::generatemacro, more-or-less.A new
crates/wit-bindgenfolder is created here with awasmtime-wit-bindgencrate which is the current contents of the generation in thewit-bindgenrepsitory. I opted to not merge the full history here since recent revisions by Pat have removed most of the historical support of lifting/lowering/async/etc so the history isn't really all that interesting. Additionally parts of thewit-bindgen-coreand various other crates were merged in here and adapted to just work for this wasmtime generator.This is intended to be the "final" interface for how developers will work with
*.witfiles and Wasmtime. Thisbindgen!macro takes in a*.witfile and will, hopefully, forevermore be how this all works. This is all included in thewasmtimecrate when thecomponent-modelfeature is enabled. Further development of this macro is expected to happen in this repository, not externally. I'll in short order delete the sources in thewit-bindgenrepository in favor of the sources here.Tests have been migrated here, mostly the
codegenones. Otherwise though the component model is already thoroughly tested so theruntime/*/host.rstests were not migrated. A few small ones have been added to ensure that the generated structure works but otherwise testing is largely left to the already tested embedding API.
alexcrichton updated PR #5317 from merge-wit-bindgen to main.
alexcrichton updated PR #5317 from merge-wit-bindgen to main.
alexcrichton updated PR #5317 from merge-wit-bindgen to main.
alexcrichton updated PR #5317 from merge-wit-bindgen to main.
alexcrichton updated PR #5317 from merge-wit-bindgen to main.
alexcrichton requested pchickey for a review on PR #5317.
alexcrichton updated PR #5317 from merge-wit-bindgen to main.
alexcrichton updated PR #5317 from merge-wit-bindgen to main.
pchickey submitted PR review.
alexcrichton merged PR #5317.
Last updated: Dec 06 2025 at 06:05 UTC