Skip to content

Commit

Permalink
Merge pull request #111 from holochain/bump-serialized-bytes-and-wasmer
Browse files Browse the repository at this point in the history
Bump serialized bytes and wasmer
  • Loading branch information
ThetaSinner authored Jun 6, 2024
2 parents 48c5c49 + fcdbeaf commit dcfa917
Show file tree
Hide file tree
Showing 9 changed files with 574 additions and 205 deletions.
6 changes: 3 additions & 3 deletions crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
name = "holochain_wasmer_common"
description = "commons for both host and guest"
license = "Apache-2.0"
version = "0.0.94"
version = "0.0.95"
authors = ["thedavidmeister", "[email protected]"]
edition = "2021"

[dependencies]
holochain_serialized_bytes = "=0.0.54"
holochain_serialized_bytes = "=0.0.55"
serde = "1"
thiserror = "1"
serde_bytes = "0.11"
Expand All @@ -18,4 +18,4 @@ default = []
error_as_host = []

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
wasmer = "=4.2.8"
wasmer = "=4.3.1"
6 changes: 3 additions & 3 deletions crates/guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "holochain_wasmer_guest"
description = "wasm guest code"
license = "Apache-2.0"
version = "0.0.94"
version = "0.0.95"
authors = ["thedavidmeister", "[email protected]"]
edition = "2021"

Expand All @@ -14,8 +14,8 @@ crate-type = ["cdylib", "rlib"]
path = "src/guest.rs"

[dependencies]
holochain_serialized_bytes = { version = "=0.0.54", features = [] }
holochain_wasmer_common = { version = "=0.0.94", path = "../common" }
holochain_serialized_bytes = { version = "=0.0.55", features = [] }
holochain_wasmer_common = { version = "=0.0.95", path = "../common" }
serde = "1"
tracing = "0.1"
parking_lot = "0.12"
Expand Down
10 changes: 5 additions & 5 deletions crates/host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
name = "holochain_wasmer_host"
description = "wasm host code"
license = "Apache-2.0"
version = "0.0.94"
version = "0.0.95"
authors = ["thedavidmeister", "[email protected]"]
edition = "2021"

[dependencies]
wasmer = "=4.2.8"
wasmer-middlewares = "=4.2.8"
holochain_wasmer_common = { version = "=0.0.94", path = "../common" }
holochain_serialized_bytes = "=0.0.54"
wasmer = "=4.3.1"
wasmer-middlewares = "=4.3.1"
holochain_wasmer_common = { version = "=0.0.95", path = "../common" }
holochain_serialized_bytes = "=0.0.55"
serde = "1"
tracing = "0.1"
parking_lot = "0.12"
Expand Down
5 changes: 3 additions & 2 deletions crates/host/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ impl SerializedModuleCache {
wasm: &[u8],
) -> Result<Arc<Module>, wasmer::RuntimeError> {
let maybe_module_path = self.module_path(key);
let (module, serialized_module) = match maybe_module_path.as_ref().map(|module_path| {
let module_load = maybe_module_path.as_ref().map(|module_path| {
// We do this the long way to get `Bytes` instead of `Vec<u8>` so
// that the clone when we both deserialize and cache is cheap.
let mut file = File::open(module_path).map_err(|e| {
Expand All @@ -279,7 +279,8 @@ impl SerializedModuleCache {
)))
})?;
Ok::<bytes::Bytes, wasmer::RuntimeError>(bytes_mut.into_inner().freeze())
}) {
});
let (module, serialized_module) = match module_load {
Some(Ok(serialized_module)) => {
let deserialized_module =
unsafe { Module::deserialize(&self.runtime_engine, serialized_module.clone()) }
Expand Down
Loading

0 comments on commit dcfa917

Please sign in to comment.