Skip to content

Commit

Permalink
Try juggling some names and versions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Jan 21, 2025
1 parent d1709c6 commit 2871286
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ log = "0.4.22"
semver = "1.0.25"
js-component-bindgen = { path = "./crates/js-component-bindgen" }
structopt = "0.3.26"
wasm-encoder = "0.221.2"
wasm-metadata = "0.221.2"
wasmparser = "0.221.2"
wasmprinter = "0.221.2"
wasm-encoder = "0.220.0"
wasm-metadata = "0.220.0"
wasmparser = "0.220.0"
wasmprinter = "0.220.0"
wasmtime-environ = { version = "29.0.0", features = [
"component-model",
"compile",
] }
wat = "1.221.2"
wat = "1.220.0"
wit-bindgen = "0.36.0"
wit-bindgen-core = "0.36.0"
wit-component = { version = "0.221.2", features = ["dummy-module"] }
wit-parser = "=0.221.2"
wit-component = { version = "0.220.0", features = ["dummy-module"] }
wit-parser = "0.220.0"
xshell = "0.2.6"

[dev-dependencies]
anyhow = { workspace = true }
anyhow = { workspace = true }
8 changes: 5 additions & 3 deletions crates/js-component-bindgen/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ impl<'a> Translation<'a> {

/// Returns the exports of this module, which are not modified by
/// augmentation.
pub fn exports(&self) -> &IndexMap<String, EntityIndex> {
pub fn exports(
&self,
) -> &wasmtime_environ::wasmparser::collections::IndexMap<String, EntityIndex> {
match self {
Translation::Normal(translation) => &translation.module.exports,
Translation::Augmented { original, .. } => &original.module.exports,
Expand Down Expand Up @@ -546,7 +548,7 @@ macro_rules! define_visit {
impl<'a> VisitOperator<'a> for CollectMemOps<'_, 'a> {
type Output = ();

wasmparser::for_each_visit_operator!(define_visit);
wasmparser::for_each_operator!(define_visit);
}

impl AugmentedOp {
Expand Down Expand Up @@ -772,7 +774,7 @@ macro_rules! define_translate {
impl<'a> VisitOperator<'a> for Translator<'_, 'a> {
type Output = ();

wasmparser::for_each_visit_operator!(define_translate);
wasmparser::for_each_operator!(define_translate);
}

#[derive(Debug, Hash, Eq, PartialEq, Copy, Clone)]
Expand Down
3 changes: 1 addition & 2 deletions crates/js-component-bindgen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ pub fn generate_types(
/// Outputs the file map and import and export metadata for the Transpilation
#[cfg(feature = "transpile-bindgen")]
pub fn transpile(component: &[u8], opts: TranspileOpts) -> Result<Transpiled, anyhow::Error> {
use wasmparser::Validator;
use wasmtime_environ::component::{Component, Translator};

let name = opts.name.clone();
Expand Down Expand Up @@ -116,7 +115,7 @@ pub fn transpile(component: &[u8], opts: TranspileOpts) -> Result<Transpiled, an
// that need to be executed to instantiate a component.
let scope = ScopeVec::new();
let tunables = Tunables::default_u32();
let mut validator = Validator::default();
let mut validator = wasmtime_environ::wasmparser::Validator::default();
let mut types = ComponentTypesBuilder::new(&validator);

let (component, modules) = Translator::new(&tunables, &mut validator, &mut types, &scope)
Expand Down

0 comments on commit 2871286

Please sign in to comment.