dont depend on wiggle for just the one func

This commit is contained in:
Pat Hickey
2021-05-06 11:19:25 -07:00
parent 208013e34e
commit f3ffd74566
6 changed files with 7 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ include = ["src/**/*", "LICENSE" ]
[dependencies] [dependencies]
wasi-common = { path = "../", version = "0.26.0" } wasi-common = { path = "../", version = "0.26.0" }
wiggle = { path = "../../wiggle", version = "0.26.0" } async_trait = "0.1"
anyhow = "1.0" anyhow = "1.0"
cap-std = "0.13.7" cap-std = "0.13.7"
cap-fs-ext = "0.13.7" cap-fs-ext = "0.13.7"

View File

@@ -106,7 +106,7 @@ impl Dir {
} }
} }
#[wiggle::async_trait] #[async_trait::async_trait(?Send)]
impl WasiDir for Dir { impl WasiDir for Dir {
fn as_any(&self) -> &dyn Any { fn as_any(&self) -> &dyn Any {
self self

View File

@@ -20,7 +20,7 @@ impl File {
} }
} }
#[wiggle::async_trait] #[async_trait::async_trait(?Send)]
impl WasiFile for File { impl WasiFile for File {
fn as_any(&self) -> &dyn Any { fn as_any(&self) -> &dyn Any {
self self

View File

@@ -20,7 +20,7 @@ impl SyncSched {
} }
} }
#[wiggle::async_trait] #[async_trait::async_trait(?Send)]
impl WasiSched for SyncSched { impl WasiSched for SyncSched {
async fn poll_oneoff<'a>(&self, poll: &mut Poll<'a>) -> Result<(), Error> { async fn poll_oneoff<'a>(&self, poll: &mut Poll<'a>) -> Result<(), Error> {
if poll.is_empty() { if poll.is_empty() {

View File

@@ -21,7 +21,7 @@ impl SyncSched {
} }
} }
#[wiggle::async_trait] #[async_trait::async_trait(?Send)]
impl WasiSched for SyncSched { impl WasiSched for SyncSched {
async fn poll_oneoff<'a>(&self, poll: &mut Poll<'a>) -> Result<(), Error> { async fn poll_oneoff<'a>(&self, poll: &mut Poll<'a>) -> Result<(), Error> {
if poll.is_empty() { if poll.is_empty() {

View File

@@ -22,7 +22,7 @@ pub fn stdin() -> Stdin {
Stdin(std::io::stdin()) Stdin(std::io::stdin())
} }
#[wiggle::async_trait] #[async_trait::async_trait(?Send)]
impl WasiFile for Stdin { impl WasiFile for Stdin {
fn as_any(&self) -> &dyn Any { fn as_any(&self) -> &dyn Any {
self self
@@ -125,7 +125,7 @@ impl AsRawFd for Stdin {
macro_rules! wasi_file_write_impl { macro_rules! wasi_file_write_impl {
($ty:ty) => { ($ty:ty) => {
#[wiggle::async_trait] #[async_trait::async_trait(?Send)]
impl WasiFile for $ty { impl WasiFile for $ty {
fn as_any(&self) -> &dyn Any { fn as_any(&self) -> &dyn Any {
self self