Add experimental struct with views memory and ctxs

This struct is heavily taking from Lucet's Vmctx struct.
This commit is contained in:
Jakub Konka
2019-05-10 20:13:50 +02:00
parent 328b8f3d91
commit 751a1a1f7b
5 changed files with 202 additions and 103 deletions

View File

@@ -198,6 +198,16 @@ pub struct WasiCtx {
pub env: Vec<CString>,
}
impl Default for WasiCtx {
fn default() -> Self {
Self {
fds: HashMap::new(),
args: Vec::new(),
env: Vec::new(),
}
}
}
impl WasiCtx {
/// Make a new `WasiCtx` with some default settings.
///