1#![no_std]
3#![cfg_attr(
5 all(target_arch = "xtensa", stackful_fp_control),
6 feature(asm_experimental_arch)
7)]
8
9extern crate alloc;
10#[cfg(target_os = "linux")]
11extern crate std;
12
13#[cfg(target_arch = "wasm32")]
14compile_error!("stackful: Wasm cannot switch native stacks");
15#[cfg(not(any(
16 target_arch = "x86_64",
17 target_arch = "aarch64",
18 target_arch = "arm",
19 target_arch = "riscv32",
20 target_arch = "xtensa",
21 target_arch = "wasm32"
22)))]
23compile_error!("stackful: unsupported architecture");
24#[cfg(all(not(target_os = "linux"), not(target_os = "none")))]
25compile_error!("stackful: supported operating systems are Linux and bare metal");
26
27#[cfg(all(
28 any(
29 target_arch = "x86_64",
30 target_arch = "aarch64",
31 target_arch = "arm",
32 target_arch = "riscv32",
33 target_arch = "xtensa"
34 ),
35 any(target_os = "linux", target_os = "none")
36))]
37mod runtime;
38#[cfg(all(
39 any(
40 target_arch = "x86_64",
41 target_arch = "aarch64",
42 target_arch = "arm",
43 target_arch = "riscv32",
44 target_arch = "xtensa"
45 ),
46 any(target_os = "linux", target_os = "none")
47))]
48pub use runtime::*;