wasmtime-wiggle-macro: adopt config system from wiggle-generate

This commit is contained in:
Pat Hickey
2020-06-22 18:39:33 -07:00
parent 7d3d16aef0
commit 185701df1b
6 changed files with 97 additions and 59 deletions

View File

@@ -6,7 +6,9 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder};
// Defines a `struct Wasi` with member fields and appropriate APIs for dealing
// with all the various WASI exports.
wasmtime_wiggle::define_struct_for_wiggle!("phases/snapshot/witx/wasi_snapshot_preview1.witx");
wasmtime_wiggle::define_struct_for_wiggle!({
witx: ["../wasi-common/WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx"],
});
pub fn is_wasi_module(name: &str) -> bool {
// FIXME: this should be more conservative, but while WASI is in flux and