mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-13 17:11:21 +00:00
parse and store custom sections from wasm, guarded by vfs feature flag
This commit is contained in:
@ -8,6 +8,8 @@ pub type LinkResult<T> = std::result::Result<T, Vec<LinkError>>;
|
||||
pub type RuntimeResult<T> = std::result::Result<T, RuntimeError>;
|
||||
pub type CallResult<T> = std::result::Result<T, CallError>;
|
||||
pub type ResolveResult<T> = std::result::Result<T, ResolveError>;
|
||||
#[cfg(feature = "vfs")]
|
||||
pub type ParseResult<T> = std::result::Result<T, ParseError>;
|
||||
|
||||
/// This is returned when the chosen compiler is unable to
|
||||
/// successfully compile the provided webassembly module into
|
||||
@ -445,3 +447,16 @@ impl Into<GrowError> for MemoryProtectionError {
|
||||
GrowError::CouldNotProtectMemory(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "vfs")]
|
||||
#[derive(Debug)]
|
||||
pub enum ParseError {
|
||||
BinaryReadError,
|
||||
}
|
||||
|
||||
#[cfg(feature = "vfs")]
|
||||
impl From<wasmparser::BinaryReaderError> for ParseError {
|
||||
fn from(_: wasmparser::BinaryReaderError) -> Self {
|
||||
ParseError::BinaryReadError
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user