Add start of wasi fs

This commit is contained in:
Lachlan Sneff
2019-04-01 15:15:20 -07:00
parent 48b5918895
commit 68f1123ad6
4 changed files with 205 additions and 5 deletions

View File

@ -1,9 +1,13 @@
#[macro_use]
extern crate log;
mod ptr;
mod state;
mod syscalls;
mod utils;
use self::state::WasiState;
use self::state::{WasiState, WasiFs};
use self::syscalls::*;
use std::ffi::c_void;
@ -21,6 +25,7 @@ pub fn generate_import_object(args: Vec<Vec<u8>>, envs: Vec<Vec<u8>>) -> ImportO
}
let state = Box::new(WasiState {
fs: WasiFs::new().unwrap(),
args: &args[..],
envs: &envs[..],
});