wiggle::async_trait is defined as async_trait::async_trait(?Send)

async methods used by wiggle currently need to Not have the Send
constraint, so rather than make all use sites pass the argument
to the re-exported async_trait macro, define a new macro that
applies the argument.
This commit is contained in:
Pat Hickey
2021-03-29 10:04:42 -07:00
parent b1a3c9047f
commit e38166ac3f
7 changed files with 25 additions and 10 deletions

View File

@@ -6,9 +6,8 @@ use std::slice;
use std::str;
use std::sync::Arc;
pub use wiggle_macro::from_witx;
// re-exports so users of wiggle don't need to track the dependency:
pub use async_trait::async_trait;
pub use wiggle_macro::{async_trait, from_witx};
pub use bitflags;
#[cfg(feature = "wiggle_metadata")]
@@ -24,6 +23,10 @@ pub use error::GuestError;
pub use guest_type::{GuestErrorType, GuestType, GuestTypeTransparent};
pub use region::Region;
pub mod async_trait_crate {
pub use async_trait::*;
}
/// A trait which abstracts how to get at the region of host memory taht
/// contains guest memory.
///