use WASI_ROOT env var to specify witx paths to wiggle macros
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
use crate::WasiCtx;
|
use crate::WasiCtx;
|
||||||
|
|
||||||
wiggle::from_witx!({
|
wiggle::from_witx!({
|
||||||
witx: ["WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx"],
|
witx: ["$WASI_ROOT/phases/snapshot/witx/wasi_snapshot_preview1.witx"],
|
||||||
ctx: WasiCtx,
|
ctx: WasiCtx,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,9 @@ pub use wasi_common::{WasiCtx, WasiCtxBuilder};
|
|||||||
wasmtime_wiggle::wasmtime_integration!({
|
wasmtime_wiggle::wasmtime_integration!({
|
||||||
// The wiggle code to integrate with lives here:
|
// The wiggle code to integrate with lives here:
|
||||||
target: wasi_common::wasi,
|
target: wasi_common::wasi,
|
||||||
// This must be the same witx document as used above:
|
// This must be the same witx document as used above. This should be ensured by
|
||||||
witx: ["../wasi-common/WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx"],
|
// the `WASI_ROOT` env variable, which is set in wasi-common's `build.rs`.
|
||||||
|
witx: ["$WASI_ROOT/phases/snapshot/witx/wasi_snapshot_preview1.witx"],
|
||||||
// This must be the same ctx type as used for the target:
|
// This must be the same ctx type as used for the target:
|
||||||
ctx: WasiCtx,
|
ctx: WasiCtx,
|
||||||
// This macro will emit a struct to represent the instance,
|
// This macro will emit a struct to represent the instance,
|
||||||
|
|||||||
Reference in New Issue
Block a user