twizzler_rt_abi/
lib.rs

1#![no_std]
2#![feature(allocator_api)]
3#![allow(internal_features)]
4#![feature(rustc_attrs)]
5#![feature(auto_traits)]
6#![feature(negative_impls)]
7#![cfg_attr(
8    all(feature = "stderr", not(any(feature = "rustc-dep-of-std", doc))),
9    feature(io_error_inprogress)
10)]
11#![cfg_attr(
12    all(feature = "stderr", not(any(feature = "rustc-dep-of-std", doc))),
13    feature(io_error_more)
14)]
15#![cfg_attr(feature = "kernel", allow(unused))]
16
17pub mod core;
18#[allow(unused_imports)]
19pub mod object;
20
21pub mod alloc;
22pub mod arch;
23pub mod debug;
24pub mod exec;
25pub mod fd;
26pub mod info;
27pub mod io;
28pub mod marker;
29pub mod random;
30pub mod thread;
31pub mod time;
32
33#[allow(
34    non_camel_case_types,
35    dead_code,
36    non_upper_case_globals,
37    improper_ctypes
38)]
39pub mod bindings;
40
41pub mod error;
42
43pub type Result<T> = ::core::result::Result<T, error::TwzError>;
44
45#[macro_export]
46macro_rules! nk {
47    ($ex:expr) => {{
48        #[cfg(feature = "kernel")]
49        {
50            panic!("tried to call twz_rt from kernel")
51        }
52        #[allow(unreachable_code)]
53        $ex
54    }};
55}