Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wasmer-wasi-js compilation #3467

Merged
merged 4 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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