From 9991980694b9457916f7ca52f6039eae527fa6b2 Mon Sep 17 00:00:00 2001 From: Michael-F-Bryan Date: Thu, 23 Mar 2023 09:54:01 +0800 Subject: [PATCH] Bump to the latest webc version --- Cargo.lock | 15 ++++++++------- Cargo.toml | 3 --- lib/c-api/Cargo.toml | 2 +- lib/cli/Cargo.toml | 2 +- lib/registry/Cargo.toml | 2 +- lib/vfs/Cargo.toml | 2 +- lib/wasi/Cargo.toml | 2 +- lib/wasi/src/runners/container.rs | 2 +- lib/wasi/src/runners/emscripten.rs | 2 +- lib/wasi/src/runners/wasi.rs | 2 +- lib/wasi/src/runners/wcgi/runner.rs | 4 ++-- 11 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b65b76a6ec9..6946f07815e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4775,7 +4775,7 @@ dependencies = [ "tokio", "tracing", "typetag", - "webc 5.0.0-rc.5", + "webc 5.0.0-rc.6", ] [[package]] @@ -5288,7 +5288,7 @@ dependencies = [ "wasmer-middlewares", "wasmer-types", "wasmer-wasix", - "webc 5.0.0-rc.5", + "webc 5.0.0-rc.6", ] [[package]] @@ -5395,7 +5395,7 @@ dependencies = [ "wasmer-wast", "wasmparser 0.51.4", "webc 4.1.1", - "webc 5.0.0-rc.5", + "webc 5.0.0-rc.6", ] [[package]] @@ -5669,7 +5669,7 @@ dependencies = [ "toml", "url", "wasmer-toml", - "webc 5.0.0-rc.5", + "webc 5.0.0-rc.6", "whoami", ] @@ -5803,7 +5803,7 @@ dependencies = [ "wasmer-wasix-types", "wcgi", "wcgi-host", - "webc 5.0.0-rc.5", + "webc 5.0.0-rc.6", "weezl", "winapi", ] @@ -6145,8 +6145,9 @@ dependencies = [ [[package]] name = "webc" -version = "5.0.0-rc.5" -source = "git+https://github.com/wasmerio/pirita?branch=compat-patches#e9180ce2467c72139661443f384df105f01da278" +version = "5.0.0-rc.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa158c77bd41040f4b9a4b91be63446885ce9b04bc9a5bb457fa586e7a8c9815" dependencies = [ "anyhow", "base64 0.21.0", diff --git a/Cargo.toml b/Cargo.toml index 4453af254dd..e38c8e7f129 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,9 +26,6 @@ wasmer-types = { version = "=3.2.0-alpha.1", path = "lib/types" } wasmer-middlewares = { version = "=3.2.0-alpha.1", path = "lib/middlewares", optional = true } cfg-if = "1.0" -[patch.crates-io] -webc = { version = "5.0.0-rc.5", git = "https://github.com/wasmerio/pirita", branch = "compat-patches" } - [workspace] members = [ "lib/api", diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index 14c03c2ef25..e2e8ef15870 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -32,7 +32,7 @@ wasmer-middlewares = { version = "=3.2.0-alpha.1", path = "../middlewares", opti wasmer-wasix = { version = "0.1.0", path = "../wasi", features = ["host-fs", "host-vnet"], optional = true } wasmer-types = { version = "=3.2.0-alpha.1", path = "../types" } virtual-fs = { version = "0.1.0", path = "../vfs", optional = true, default-features = false, features = ["static-fs"] } -webc = { version = "5.0.0-rc.5", optional = true } +webc = { version = "5.0.0-rc.6", optional = true } enumset = "1.0.2" cfg-if = "1.0" lazy_static = "1.4" diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 92598d2b22f..01ef753afc6 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -66,7 +66,7 @@ regex = "1.6.0" toml = "0.5.9" url = "2.3.1" libc = { version = "^0.2", default-features = false } -webc = { version = "5.0.0-rc.5" } +webc = { version = "5.0.0-rc.6" } # HACK(Michael-F-Bryan): Remove this once a new version of wapm-targz-to-pirita # is published that doesn't have a public dependency on webc webc_v4 = { version = "4", package = "webc" } diff --git a/lib/registry/Cargo.toml b/lib/registry/Cargo.toml index a607d2bde75..b5a9d0271ae 100644 --- a/lib/registry/Cargo.toml +++ b/lib/registry/Cargo.toml @@ -24,7 +24,7 @@ tar = "0.4.38" flate2 = "1.0.24" semver = "1.0.14" lzma-rs = "0.2.0" -webc = { version = "5.0.0-rc.5", features = ["mmap"] } +webc = { version = "5.0.0-rc.6", features = ["mmap"] } hex = "0.4.3" tokio = "1.24.0" log = "0.4.17" diff --git a/lib/vfs/Cargo.toml b/lib/vfs/Cargo.toml index 5317cb6a918..5d521d81078 100644 --- a/lib/vfs/Cargo.toml +++ b/lib/vfs/Cargo.toml @@ -11,7 +11,7 @@ libc = { version = "^0.2", default-features = false, optional = true } thiserror = "1" tracing = { version = "0.1" } typetag = { version = "0.1", optional = true } -webc = { version = "5.0.0-rc.5", optional = true } +webc = { version = "5.0.0-rc.6", optional = true } slab = { version = "0.4" } derivative = "2.2.0" anyhow = { version = "1.0.66", optional = true } diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index 6cd761de808..401102e9248 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -28,7 +28,7 @@ bincode = { version = "1.3" } chrono = { version = "^0.4", default-features = false, features = [ "wasmbind", "std", "clock" ], optional = true } derivative = { version = "^2" } bytes = "1" -webc = { version = "5.0.0-rc.5", default-features = false } +webc = { version = "5.0.0-rc.6", default-features = false } serde_cbor = { version = "0.11.2", optional = true } anyhow = { version = "1.0.66" } lazy_static = "1.4" diff --git a/lib/wasi/src/runners/container.rs b/lib/wasi/src/runners/container.rs index 810f5b6c0ca..bd1e7dda782 100644 --- a/lib/wasi/src/runners/container.rs +++ b/lib/wasi/src/runners/container.rs @@ -28,7 +28,7 @@ impl WapmContainer { pub fn from_bytes(bytes: Bytes) -> std::result::Result { match webc::detect(bytes.as_ref())? { Version::V1 => { - let webc = WebCOwned::parse(bytes.into(), &ParseOptions::default())?; + let webc = WebCOwned::parse(bytes, &ParseOptions::default())?; Ok(WapmContainer { repr: Repr::V1Owned(Arc::new(webc)), }) diff --git a/lib/wasi/src/runners/emscripten.rs b/lib/wasi/src/runners/emscripten.rs index f0b9cb4ee8e..81b66a7714e 100644 --- a/lib/wasi/src/runners/emscripten.rs +++ b/lib/wasi/src/runners/emscripten.rs @@ -63,7 +63,7 @@ impl crate::runners::Runner for EmscriptenRunner { atom: atom_name, main_args, .. - } = command.get_annotation("emscripten")?.unwrap_or_default(); + } = command.annotation("emscripten")?.unwrap_or_default(); let atom_name = atom_name.context("The atom name is required")?; let atom_bytes = container .get_atom(&atom_name) diff --git a/lib/wasi/src/runners/wasi.rs b/lib/wasi/src/runners/wasi.rs index d17b72382ac..a63a0f44f51 100644 --- a/lib/wasi/src/runners/wasi.rs +++ b/lib/wasi/src/runners/wasi.rs @@ -169,7 +169,7 @@ impl crate::runners::Runner for WasiRunner { command: &Command, container: &WapmContainer, ) -> Result { - let atom_name = match command.get_annotation("wasi")? { + let atom_name = match command.annotation("wasi")? { Some(Wasi { atom, .. }) => atom, None => command_name.to_string(), }; diff --git a/lib/wasi/src/runners/wcgi/runner.rs b/lib/wasi/src/runners/wcgi/runner.rs index ed6dd3bfde8..b7356d24b0b 100644 --- a/lib/wasi/src/runners/wcgi/runner.rs +++ b/lib/wasi/src/runners/wcgi/runner.rs @@ -41,7 +41,7 @@ impl WcgiRunner { fn run(&mut self, command_name: &str, ctx: &RunnerContext<'_>) -> Result<(), Error> { let wasi: Wasi = ctx .command() - .get_annotation("wasi") + .annotation("wasi") .context("Unable to retrieve the WASI metadata")? .unwrap_or_else(|| Wasi::new(command_name)); @@ -129,7 +129,7 @@ impl WcgiRunner { let env = construct_env(wasi, self.config.forward_host_env, &self.config.env); let args = construct_args(wasi, &self.config.args); - let Wcgi { dialect, .. } = ctx.command().get_annotation("wcgi")?.unwrap_or_default(); + let Wcgi { dialect, .. } = ctx.command().annotation("wcgi")?.unwrap_or_default(); let dialect = match dialect { Some(d) => d.parse().context("Unable to parse the CGI dialect")?,