Add an example #[wasmtime] Rust macro (#283)

This commit adds a `wasmtime-rust` crate to the `misc` folder next to
the previously added Python extension. The intention is that this
showcases loading a WebAssembly file natively in Rust and how with an
attribute macro it can feel lightweight in terms of boilerplate.

The macro itself is pretty non-featureful today beyond the bare bones to
get anything working, but there's all sorts of possibilities like
JIT-compiled entry stubs we could eventually do with all the type
information!
This commit is contained in:
Alex Crichton
2019-08-19 12:45:42 -05:00
committed by Till Schneidereit
parent 54dd085e27
commit d1b1500d19
9 changed files with 309 additions and 1 deletions

View File

@@ -39,7 +39,10 @@ rayon = "1.1"
wasm-webidl-bindings = "0.4"
[workspace]
members = ["misc/wasmtime-py"]
members = [
"misc/wasmtime-rust",
"misc/wasmtime-py",
]
[features]
lightbeam = ["wasmtime-environ/lightbeam", "wasmtime-jit/lightbeam"]