diff --git a/Cargo.lock b/Cargo.lock index 0ef1ac477b..26f719dab7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4016,9 +4016,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "893834cffb239f88413eead7cf91862a6f24c2233afae15d7808256d8c58f91e" +checksum = "703eb1d2f89ff2c52d50f7ff002735e423cea75f0a5dc5c8a4626c4c47cd9ca6" dependencies = [ "anyhow", "id-arena", diff --git a/crates/component-macro/src/bindgen.rs b/crates/component-macro/src/bindgen.rs index b132cfdf17..fa26f3454b 100644 --- a/crates/component-macro/src/bindgen.rs +++ b/crates/component-macro/src/bindgen.rs @@ -5,7 +5,7 @@ use syn::punctuated::Punctuated; use syn::token; use syn::Token; use wasmtime_wit_bindgen::Opts; -use wit_parser::World; +use wit_parser::{Document, World}; #[derive(Default)] pub struct Config { @@ -119,8 +119,10 @@ impl Parse for Opt { let span = input.parse::()?.span; input.parse::()?; let s = input.parse::()?; - let world = - World::parse("", &s.value()).map_err(|e| Error::new(s.span(), e))?; + let world = Document::parse("".as_ref(), &s.value()) + .map_err(|e| Error::new(s.span(), e))? + .into_world() + .map_err(|e| Error::new(s.span(), e))?; Ok(Opt::Inline(span, world)) } else if l.peek(kw::tracing) { input.parse::()?; diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index abea637eac..caef1ae259 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -998,3 +998,9 @@ criteria = "safe-to-deploy" version = "0.3.0" notes = "The Bytecode Alliance is the author of this crate." +[[audits.wit-parser]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.3.1" +notes = "The Bytecode Alliance is the author of this crate." +