1#![deny(
16 missing_docs,
17 clippy::missing_panics_doc,
18 clippy::missing_const_for_fn,
19 clippy::missing_safety_doc,
20 clippy::missing_errors_doc
21)]
22#![cfg_attr(not(feature = "std"), no_std)]
23#![cfg_attr(not(doctest), doc = include_str!("../README.md"))]
24
25extern crate core;
26
27pub use stabby_abi::{
28 assert_unchecked, dynptr, export, import, stabby, unreachable_unchecked, vtmacro as vtable,
29};
30
31pub use stabby_abi as abi;
32
33pub use stabby_abi::alloc::{self, boxed, collections, string, sync, vec};
34
35pub use stabby_abi::{Dyn, DynRef};
36
37pub use stabby_abi::tuple;
39
40#[cfg_attr(
42 stabby_unsafe_wakers = "true",
43 deprecated = "Warning! you are using the `stabby/stabby_unsafe_wakers` feature. This could cause UB if you poll a future received from another shared library with mismatching ABI! (this API isn't actually deprecated)"
44)]
45pub mod future {
46 pub use crate::abi::future::*;
47 use crate::boxed::Box;
48 pub type DynFuture<'a, Output> =
50 crate::dynptr!(Box<dyn Future<Output = Output> + Send + Sync + 'a>);
51 pub type DynFutureUnsync<'a, Output> =
53 crate::dynptr!(Box<dyn Future<Output = Output> + Send + 'a>);
54 pub type DynFutureUnsend<'a, Output> = crate::dynptr!(Box<dyn Future<Output = Output> + 'a>);
56}
57
58pub use crate::abi::closure;
60pub use crate::abi::{option, result, slice, str};
61
62pub use crate::abi::{vtable::Any, AccessAs, IStable, IntoSuperTrait};
63
64#[cfg(all(feature = "libloading", any(unix, windows, doc)))]
65pub mod libloading;
69
70pub mod time;
72
73#[macro_export]
75macro_rules! format {
76 ($($t: tt)*) => {{
77 use ::core::fmt::Write;
78 let mut s = $crate::string::String::default();
79 ::core::write!(s, $($t)*).map(move |_| s)
80 }};
81}
82
83#[cfg(doc)]
84#[doc = include_str!("../TUTORIAL.md")]
85pub mod _tutorial_ {}
86mod tests {
88 mod enums;
89 mod layouts;
90 mod traits;
91}