1#![doc = include_str!("../README.md")]
2#![cfg_attr(not(feature = "std"), no_std)]
3#![deny(
4 clippy::pedantic,
5 clippy::alloc_instead_of_core,
6 clippy::allow_attributes,
7 clippy::std_instead_of_alloc,
8 clippy::std_instead_of_core,
9 clippy::expect_used,
10 clippy::unwrap_used,
11 )]
13#![allow(clippy::wildcard_imports)]
14#![expect(
15 clippy::struct_excessive_bools,
16 clippy::cast_possible_truncation,
17 clippy::iter_without_into_iter
18)]
19
20pub mod audio;
21mod fs;
22pub mod graphics;
23mod input;
24pub mod math;
25mod menu;
26mod misc;
27mod net;
28pub mod shapes;
29mod stats;
30#[cfg(feature = "sudo")]
31pub mod sudo;
32
33pub use fs::*;
34pub use graphics::*;
35pub use input::*;
36pub use menu::*;
37pub use misc::*;
38pub use net::*;
39pub use stats::*;
40
41#[cfg(feature = "alloc")]
42extern crate alloc;
43
44#[cfg(all(target_family = "wasm", feature = "talc"))]
45#[global_allocator]
46static ALLOCATOR: talc::TalckWasm = unsafe { talc::TalckWasm::new_global() };
47
48#[cfg(all(not(test), not(feature = "std"), target_family = "wasm"))]
49#[panic_handler]
50#[allow(unused_variables)]
51fn handle_panic(info: &core::panic::PanicInfo) -> ! {
52 #[cfg(all(feature = "alloc", feature = "panic_info"))]
53 if true {
54 let msg = alloc::format!("{info}");
55 log_error(&msg);
56 }
57 core::arch::wasm32::unreachable()
58}