mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-29 00:21:34 +00:00
Add special error types for compile, linking, and runtime errors. (#99)
* Add error types and convert most results to wasmer-runtime results * Fix spectests * Fix umbrella project to work with new error types
This commit is contained in:
@ -2,6 +2,7 @@ use wabt::wat2wasm;
|
||||
use wasmer_clif_backend::CraneliftCompiler;
|
||||
use wasmer_runtime::{
|
||||
self as runtime,
|
||||
error::Result,
|
||||
export::{Context, Export, FuncPointer},
|
||||
import::{Imports, NamespaceMap},
|
||||
types::{FuncSig, Type, Value},
|
||||
@ -10,7 +11,7 @@ use wasmer_runtime::{
|
||||
|
||||
static EXAMPLE_WASM: &'static [u8] = include_bytes!("simple.wasm");
|
||||
|
||||
fn main() -> Result<(), String> {
|
||||
fn main() -> Result<()> {
|
||||
let wasm_binary = wat2wasm(IMPORT_MODULE.as_bytes()).expect("WAST not valid or malformed");
|
||||
let inner_module = runtime::compile(&wasm_binary, &CraneliftCompiler::new())?;
|
||||
|
||||
|
Reference in New Issue
Block a user