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

@@ -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);