Update api again and change SerializedCache to Artifact

This commit is contained in:
Lachlan Sneff
2019-02-21 17:06:49 -08:00
parent 64eadad7fa
commit 696fd8fce3
11 changed files with 84 additions and 97 deletions

View File

@ -8,7 +8,7 @@ use crate::{
};
use crate::{
cache::{Error as CacheError, SerializedCache},
cache::{Artifact, Error as CacheError},
module::ModuleInfo,
sys::Memory,
};
@ -42,11 +42,7 @@ pub trait Compiler {
/// be called from inside the runtime.
fn compile(&self, wasm: &[u8], _: Token) -> CompileResult<ModuleInner>;
unsafe fn from_cache(
&self,
cache: SerializedCache,
_: Token,
) -> Result<ModuleInner, CacheError>;
unsafe fn from_cache(&self, cache: Artifact, _: Token) -> Result<ModuleInner, CacheError>;
}
/// The functionality exposed by this trait is expected to be used