Skip to content

Commit

Permalink
Merge pull request #3467 from wasmerio/fix-wasmer-js
Browse files Browse the repository at this point in the history
Fix wasmer-wasi-js compilation
  • Loading branch information
syrusakbary authored Jan 11, 2023
2 parents 494e2ea + 89a54ae commit 6571451
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion lib/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ proc-macro2 = "1"
proc-macro-error = "1.0.0"

[dev-dependencies]
wasmer = { path = "../api" }
wasmer-types = { path = "../types", default-features=false, features = ["std"] }
compiletest_rs = "0.6"
4 changes: 2 additions & 2 deletions lib/derive/src/value_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn zero_padding(fields: &Fields) -> TokenStream {
//
// This also ensures that all fields implement ValueType.
out.extend(quote! {
::wasmer::ValueType::zero_padding_bytes(&self.#name, &mut _bytes[#start..(#start + #len)]);
::wasmer_types::ValueType::zero_padding_bytes(&self.#name, &mut _bytes[#start..(#start + #len)]);
});

let padding_end = if i == fields.len() - 1 {
Expand Down Expand Up @@ -101,7 +101,7 @@ pub fn impl_value_type(input: &DeriveInput) -> TokenStream {
let zero_padding = zero_padding(fields);

quote! {
unsafe impl #impl_generics ::wasmer::ValueType for #struct_name #ty_generics #where_clause {
unsafe impl #impl_generics ::wasmer_types::ValueType for #struct_name #ty_generics #where_clause {
#[inline]
fn zero_padding_bytes(&self, _bytes: &mut [::core::mem::MaybeUninit<u8>]) {
#zero_padding
Expand Down
7 changes: 1 addition & 6 deletions lib/wasi-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,11 @@ wit-bindgen-core = { package = "wasmer-wit-bindgen-gen-core", version = "0.1.1"
wit-parser = { package = "wasmer-wit-parser", version = "0.1.1" }
wasmer-types = { path = "../types", version = "=3.1.0" }
wasmer-derive = { path = "../derive", version = "=3.1.0" }
wasmer = { path = "../api", version = "=3.1.0", default-features=false }
serde = { version = "1.0", features = ["derive"], optional = true }
byteorder = "1.3"
time = "0.2"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasmer = { default-features = false, path = "../api", version = "3.0.0-beta", features = ["js"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
wasmer = { default-features = false, path = "../api", version = "3.0.0-beta", features = ["sys"] }

[dev-dependencies.pretty_assertions]
version = "1.3.0"

Expand Down

0 comments on commit 6571451

Please sign in to comment.