stak_util/lib.rs
1//! Utilities around `libc`.
2
3#![no_std]
4
5#[doc(hidden)]
6pub mod __private {
7 pub use cfg_elif;
8 pub use noop_executor;
9}
10
11/// Blocks on a future if an `async` feature in on, or returns a given value as
12/// it is otherwise.
13#[macro_export]
14macro_rules! block_on {
15 ($value:expr) => {
16 $crate::__private::cfg_elif::expr::feature!(if ("async") {
17 $crate::__private::noop_executor::block_on($value)
18 } else {
19 $value
20 })
21 };
22}