rename everything c2 related to the "real" names

This commit is contained in:
Pat Hickey
2021-01-28 15:34:03 -08:00
parent 47fec44c10
commit 9bd89abc0c
24 changed files with 90 additions and 469 deletions

View File

@@ -11,10 +11,10 @@ license = "Apache-2.0 WITH LLVM-exception"
cfg-if = "1.0"
[dev-dependencies]
wasi-c2 = { path = "../wasi-c2", version = "0.22.0" }
wasi-c2-wasmtime = { path = "../wasi-c2/wasmtime", version = "0.22.0" }
wasi-c2-cap-std-sync = { path = "../wasi-c2/cap-std-sync", version = "0.22.0" }
wasi-common = { path = "../wasi-common", version = "0.22.0" }
wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync", version = "0.22.0" }
wasmtime = { path = "../wasmtime", version = "0.22.0" }
wasmtime-wasi = { path = "../wasi", version = "0.22.0" }
target-lexicon = "0.11.0"
pretty_env_logger = "0.4.0"
tempfile = "3.1.0"

View File

@@ -1,7 +1,7 @@
use anyhow::Context;
use std::path::Path;
use wasi_c2::pipe::{ReadPipe, WritePipe};
use wasi_c2_cap_std_sync::WasiCtxBuilder;
use wasi_cap_std_sync::WasiCtxBuilder;
use wasi_common::pipe::{ReadPipe, WritePipe};
use wasmtime::{Linker, Module, Store};
pub fn instantiate(data: &[u8], bin_name: &str, workspace: Option<&Path>) -> anyhow::Result<()> {
@@ -42,7 +42,7 @@ pub fn instantiate(data: &[u8], bin_name: &str, workspace: Option<&Path>) -> any
builder = builder.env("ERRNO_MODE_UNIX", "1")?;
}
let snapshot1 = wasi_c2_wasmtime::Wasi::new(&store, builder.build()?);
let snapshot1 = wasi_wasmtime::Wasi::new(&store, builder.build()?);
let mut linker = Linker::new(&store);
@@ -97,7 +97,7 @@ pub fn instantiate_inherit_stdio(
builder = builder.preopened_dir(preopen_dir, ".")?;
}
let snapshot1 = wasi_c2_wasmtime::Wasi::new(&store, builder.build()?);
let snapshot1 = wasi_wasmtime::Wasi::new(&store, builder.build()?);
let mut linker = Linker::new(&store);