Fix fuzz and wasi-c builds (#447)
* Fix the wasmtime-wasi-c crate build and upgrade it to Rust 2018. * Fix the fuzz build.
This commit is contained in:
@@ -7,6 +7,7 @@ categories = ["wasm"]
|
||||
repository = "https://github.com/CraneStation/wasmtime"
|
||||
license = "Apache-2.0 WITH LLVM-exception"
|
||||
readme = "README.md"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
wasmtime-runtime = { path = "../wasmtime-runtime" }
|
||||
|
||||
@@ -2,6 +2,7 @@ use crate::host::{
|
||||
argv_environ_init, argv_environ_values, fd_prestats, fd_prestats_init, fd_prestats_insert,
|
||||
fd_table, fd_table_init, fd_table_insert_existing,
|
||||
};
|
||||
use crate::syscalls;
|
||||
use alloc::rc::Rc;
|
||||
use core::cell::RefCell;
|
||||
use cranelift_codegen::ir::types;
|
||||
@@ -13,7 +14,6 @@ use std::ffi::CString;
|
||||
use std::fs::File;
|
||||
use std::mem;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use syscalls;
|
||||
use target_lexicon::HOST;
|
||||
use wasmtime_environ::{translate_signature, Export, Module};
|
||||
use wasmtime_runtime::{Imports, InstanceHandle, InstantiationError, VMFunctionBody};
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
extern crate cranelift_codegen;
|
||||
extern crate cranelift_entity;
|
||||
extern crate cranelift_wasm;
|
||||
extern crate target_lexicon;
|
||||
extern crate wasmtime_environ;
|
||||
extern crate wasmtime_jit;
|
||||
extern crate wasmtime_runtime;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate alloc;
|
||||
extern crate core;
|
||||
|
||||
mod host;
|
||||
mod instantiate;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use crate::host;
|
||||
use crate::host::{argv_environ_values, fd_prestats, fd_table};
|
||||
use crate::instantiate::WASIState;
|
||||
use crate::translate::*;
|
||||
use crate::wasm32;
|
||||
use core::convert::TryFrom;
|
||||
use cranelift_codegen::ir::types::{Type, I32, I64};
|
||||
use host;
|
||||
use std::{mem, ptr, slice, str};
|
||||
use translate::*;
|
||||
use wasm32;
|
||||
use wasmtime_runtime::VMContext;
|
||||
|
||||
fn str_for_trace<'str>(ptr: *const i8, len: usize) -> Result<&'str str, str::Utf8Error> {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::host;
|
||||
use crate::wasm32;
|
||||
use core::convert::TryFrom;
|
||||
use host;
|
||||
use std::mem::{align_of, size_of, zeroed};
|
||||
use std::slice;
|
||||
use wasm32;
|
||||
use wasmtime_runtime::{Export, VMContext};
|
||||
|
||||
/// Translate a wasm pointer into a native pointer.
|
||||
|
||||
Reference in New Issue
Block a user