Browse Source

Include Version in the export name if required (#7656)

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
pull/7682/head
James Sturtevant 11 months ago
committed by GitHub
parent
commit
ef70686be9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      crates/component-macro/tests/codegen/multiversion/root.wit
  2. 2
      crates/wit-bindgen/src/lib.rs

1
crates/component-macro/tests/codegen/multiversion/root.wit

@ -3,5 +3,6 @@ package foo:bar;
world foo {
import my:dep/a@0.1.0;
import my:dep/a@0.2.0;
export my:dep/a@0.1.0;
export my:dep/a@0.2.0;
}

2
crates/wit-bindgen/src/lib.rs

@ -474,7 +474,7 @@ impl Wasmtime {
format!(
"{}_{}_{snake}",
pkgname.namespace.to_snake_case(),
pkgname.name.to_snake_case()
self.name_package_module(resolve, iface.package.unwrap())
),
),
None => (format!("exports::{snake}::{camel}"), snake.clone()),

Loading…
Cancel
Save