Files
wasmtime/crates/wasi-common/yanix/src/sys/mod.rs
Dan Gohman cf5289c553 Begin porting yanix to WASI.
This isn't complete yet, but subsequent steps will depend on Rust libstd
and libc bindings changes that are in flight.
2020-07-06 20:20:28 +02:00

33 lines
929 B
Rust

use crate::dir::SeekLoc;
use cfg_if::cfg_if;
use std::io::Result;
cfg_if! {
if #[cfg(any(target_os = "linux",
target_os = "android"))] {
mod linux;
pub(crate) use linux::*;
} else if #[cfg(target_os = "emscripten")] {
mod emscripten;
pub(crate) use emscripten::*;
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
target_os = "dragonfly"))] {
mod bsd;
pub(crate) use bsd::*;
} else if #[cfg(target_os = "wasi")] {
mod wasi;
pub(crate) use wasi::*;
} else {
compile_error!("yanix doesn't compile for this platform yet");
}
}
pub trait EntryExt {
fn ino(&self) -> u64;
fn seek_loc(&self) -> Result<SeekLoc>;
}