Move preopen_dir handlers from wasmtime to wasi-common
This commit is contained in:
@@ -2,6 +2,14 @@ pub mod fdentry;
|
||||
mod host_impl;
|
||||
pub mod hostcalls;
|
||||
|
||||
pub fn dev_null() -> std::fs::File {
|
||||
std::fs::File::open("/dev/null").expect("failed to open /dev/null")
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::path::Path;
|
||||
|
||||
pub fn dev_null() -> File {
|
||||
File::open("/dev/null").expect("failed to open /dev/null")
|
||||
}
|
||||
|
||||
pub fn preopen_dir<P: AsRef<Path>>(path: P) -> io::Result<File> {
|
||||
File::open(path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user