mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 22:25:40 +00:00
init zbox first
This commit is contained in:
parent
d164c7a93b
commit
8bab9f1bea
@ -10,8 +10,9 @@ use std::{
|
|||||||
ops::{Index, IndexMut},
|
ops::{Index, IndexMut},
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
time::SystemTime,
|
time::SystemTime,
|
||||||
|
path::PathBuf,
|
||||||
};
|
};
|
||||||
use zbox::{File, FileType, OpenOptions, Repo, RepoOpener};
|
use zbox::{File, FileType, OpenOptions, Repo, RepoOpener, init_env as zbox_init_env};
|
||||||
|
|
||||||
pub const MAX_SYMLINKS: usize = 100;
|
pub const MAX_SYMLINKS: usize = 100;
|
||||||
|
|
||||||
@ -57,10 +58,11 @@ pub struct WasiFs {
|
|||||||
|
|
||||||
impl WasiFs {
|
impl WasiFs {
|
||||||
pub fn new() -> Result<Self, String> {
|
pub fn new() -> Result<Self, String> {
|
||||||
|
zbox_init_env();
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
repo: RepoOpener::new()
|
repo: RepoOpener::new()
|
||||||
.create(true)
|
.create(true)
|
||||||
.open("mem://not-an-emoji", "very unsafe pwd")
|
.open("mem://foo", "")
|
||||||
.map_err(|e| e.to_string())?,
|
.map_err(|e| e.to_string())?,
|
||||||
name_map: HashMap::new(),
|
name_map: HashMap::new(),
|
||||||
inodes: Arena::new(),
|
inodes: Arena::new(),
|
||||||
|
Loading…
Reference in New Issue
Block a user