From a2eafd400f8eaa12efc97b7f3cb52626c0400298 Mon Sep 17 00:00:00 2001 From: Jake Lang Date: Fri, 19 Apr 2019 17:17:25 -0400 Subject: [PATCH] Document using wasmtime as a dependency in the README --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 081ac7c874..90b3af26a5 100644 --- a/README.md +++ b/README.md @@ -56,4 +56,24 @@ Additional goals for Wasmtime include: [Cranelift]: https://github.com/CraneStation/cranelift [Lightbeam]: https://github.com/CraneStation/lightbeam +#### Including Wasmtime in your project +Wasmtime exposes an API for JIT compilation through the `wasmtime-jit` subcrate, which depends on `wasmtime-environ` and `wasmtime-runtime` for the ABI and runtime support respectively. However, this API is not documented and subject to change. Please use at your own risk! + +Build the individual crates as such: + +``` +cargo build --package wasmtime-jit +``` + +Wasmtime does not currently publish these crates on crates.io. They may be included as a git dependency, like this: + +```toml +[dependencies] +wasmtime-environ = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" } +wasmtime-runtime = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" } +wasmtime-jit = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" } +``` + +All three crates must be specified as dependencies for `wasmtime-jit` to build correctly, at the moment. + It's Wasmtime.