Module holochain_wasmer_host::module
source · Structs
- Caches deserialized wasm modules. Deserialization of cached modules from the cache to create callable instances is slow. Therefore modules are cached in memory after deserialization.
- Cache for serialized modules. These are fully compiled wasm modules that are then serialized by wasmer and can be cached. A serialized wasm module must still be deserialized before it can be used to build instances. The deserialization process is far faster than compiling and much slower than instance building.
Constants
- one hundred giga ops
Traits
- Higher level trait over the plru cache to make it a bit easier to interact with consistently. Default implementations for key functions are provided. Notably handles keeping the mapping between cache keys and items, and the plru tracking including touching and evicting.
Functions
- Take WASM binary and prepare a wasmer Module suitable for iOS
- Deserialize a previously compiled module for iOS from a file.
- Generate an engine with a wasm compiler and Metering (use limits) in place.
- Generate a runtime
Engine
without compiler suitable for iOS. Useful for re-building an iOS Module from a preserialized WASM Module. - Configuration of a Target for wasmer for iOS
Type Aliases
- We expect cache keys to be produced via hashing so 32 bytes is enough for all purposes.
- Plru uses a usize to track “recently used” so we need a map between 32 byte cache keys and the bits used to evict things from the cache.
- Modules serialize to a vec of bytes as per wasmer.