Move back to only one WASI submodule (#1434)
* Move back to only one WASI submodule This commit fixes the issue where we have two WASI submodules for build reasons in this repository. The fix was to place the submodule in the `wasi-common` crate, and then anyone using the `wig` crate has to be sure to define a `WASI_ROOT` env var in a build script to be able to parse witx files. With all that in place `wasi-common` becomes the source of truth for the witx files we're parsing, and crates like `wasmtime-wasi` use build-scripts shenanigans to read the same witx files. This should hopefully get us so we're compatible with publishing and still only have one submodule! * rustfmt
This commit is contained in:
@@ -8,7 +8,7 @@ use crate::old::snapshot_0::wasi::*;
|
||||
use std::{convert::TryInto, io, mem, slice};
|
||||
use wig::witx_host_types;
|
||||
|
||||
witx_host_types!("old/snapshot_0" "wasi_unstable");
|
||||
witx_host_types!("phases/old/snapshot_0/witx/wasi_unstable.witx");
|
||||
|
||||
pub(crate) unsafe fn ciovec_to_host(ciovec: &__wasi_ciovec_t) -> io::IoSlice {
|
||||
let slice = slice::from_raw_parts(ciovec.buf as *const u8, ciovec.buf_len);
|
||||
|
||||
@@ -9,7 +9,7 @@ pub mod wasi;
|
||||
pub mod wasi32;
|
||||
|
||||
pub mod hostcalls {
|
||||
wig::define_hostcalls!("old/snapshot_0" "wasi_unstable");
|
||||
wig::define_hostcalls!("phases/old/snapshot_0/witx/wasi_unstable.witx");
|
||||
}
|
||||
|
||||
pub use ctx::{WasiCtx, WasiCtxBuilder};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
use wig::witx_wasi_types;
|
||||
|
||||
witx_wasi_types!("old/snapshot_0" "wasi_unstable");
|
||||
witx_wasi_types!("phases/old/snapshot_0/witx/wasi_unstable.witx");
|
||||
|
||||
pub type WasiResult<T> = Result<T, WasiError>;
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@ use wig::witx_wasi32_types;
|
||||
pub type uintptr_t = u32;
|
||||
pub type size_t = u32;
|
||||
|
||||
witx_wasi32_types!("old/snapshot_0" "wasi_unstable");
|
||||
witx_wasi32_types!("phases/old/snapshot_0/witx/wasi_unstable.witx");
|
||||
|
||||
Reference in New Issue
Block a user