Skip to content

Commit

Permalink
Bump to the latest webc version
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-F-Bryan committed Mar 23, 2023
1 parent d8d43cb commit 9991980
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 20 deletions.
15 changes: 8 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lib/c-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion lib/registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/vfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi/src/runners/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl WapmContainer {
pub fn from_bytes(bytes: Bytes) -> std::result::Result<Self, WebcParseError> {
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)),
})
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi/src/runners/emscripten.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi/src/runners/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl crate::runners::Runner for WasiRunner {
command: &Command,
container: &WapmContainer,
) -> Result<Self::Output, Error> {
let atom_name = match command.get_annotation("wasi")? {
let atom_name = match command.annotation("wasi")? {
Some(Wasi { atom, .. }) => atom,
None => command_name.to_string(),
};
Expand Down
4 changes: 2 additions & 2 deletions lib/wasi/src/runners/wcgi/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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")?,
Expand Down

0 comments on commit 9991980

Please sign in to comment.