Add a wasmtime::component::bindgen! macro (#5317)

* Import Wasmtime support from the `wit-bindgen` repo

This commit imports the `wit-bindgen-gen-host-wasmtime-rust` crate from
the `wit-bindgen` repository into the upstream Wasmtime repository. I've
chosen to not import the full history here since the crate is relatively
small and doesn't have a ton of complexity. While the history of the
crate is quite long the current iteration of the crate's history is
relatively short so there's not a ton of import there anyway. The
thinking is that this can now continue to evolve in-tree.

* Refactor `wasmtime-component-macro` a bit

Make room for a `wit_bindgen` macro to slot in.

* Add initial support for a `bindgen` macro

* Add tests for `wasmtime::component::bindgen!`

* Improve error forgetting `async` feature

* Add end-to-end tests for bindgen

* Add an audit of `unicase`

* Add a license to the test-helpers crate

* Add vet entry for `pulldown-cmark`

* Update publish script with new crate

* Try to fix publish script

* Update audits

* Update lock file
This commit is contained in:
Alex Crichton
2022-12-06 13:06:00 -06:00
committed by GitHub
parent 293bb5b334
commit 2329ecc341
43 changed files with 4336 additions and 1212 deletions

View File

@@ -133,6 +133,7 @@ wasi-tokio = { path = "crates/wasi-common/tokio", version = "=5.0.0" }
wasi-cap-std-sync = { path = "crates/wasi-common/cap-std-sync", version = "=5.0.0" }
wasmtime-fuzzing = { path = "crates/fuzzing" }
wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version = "=5.0.0" }
wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=5.0.0" }
cranelift-wasm = { path = "cranelift/wasm", version = "0.92.0" }
cranelift-codegen = { path = "cranelift/codegen", version = "0.92.0" }
@@ -162,6 +163,7 @@ wasmprinter = "0.2.44"
wasm-encoder = "0.20.0"
wasm-smith = "0.11.9"
wasm-mutate = "0.2.12"
wit-parser = "0.3"
windows-sys = "0.42.0"
env_logger = "0.9"
rustix = "0.36.0"
@@ -179,6 +181,7 @@ tracing = "0.1.26"
bitflags = "1.2"
thiserror = "1.0.15"
async-trait = "0.1.42"
heck = "0.4"
[features]
default = [