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

feat: remove in-memory SerializedModuleCache #136

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion Cargo.lock

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

4 changes: 0 additions & 4 deletions crates/common/src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pub enum WasmErrorInner {
ModuleBuild(String),
/// The host failed to call a function in the guest.
CallError(String),
/// Host attempted to interact with the module cache before it was initialized.
UninitializedSerializedModuleCache,
}

impl WasmErrorInner {
Expand All @@ -55,8 +53,6 @@ impl WasmErrorInner {
| Self::ModuleBuild(_)
// This is ambiguous so best to treat as potentially corrupt.
| Self::CallError(_)
// We have no cache so cannot cache.
| Self::UninitializedSerializedModuleCache
=> true,
// (De)serialization simply means some input/output data was
// unrecognisable somehow, it doesn't corrupt the guest memory.
Expand Down
11 changes: 7 additions & 4 deletions crates/host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ version = "0.0.97"
authors = ["thedavidmeister", "[email protected]"]
edition = "2021"

[lib]
name = "holochain_wasmer_host"
crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"

[dependencies]
wasmer = { version = "5.0.2", default-features = false }
wasmer-middlewares = { version = "5.0.2", optional = true }
Expand All @@ -20,10 +25,8 @@ bytes = "1"
hex = "0.4"
thiserror = "2"

[lib]
name = "holochain_wasmer_host"
crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"
[dev-dependencies]
tempfile = "3.14.0"

[features]
default = ["error_as_host", "wasmer_sys_dev"]
Expand Down
Loading
Loading