Skip to main content

ax_std/
lib.rs

1//! # The ArceOS Standard Library
2//!
3//! The [ArceOS] Standard Library is a mini-std library, with an interface similar
4//! to rust [std], but calling the functions directly in ArceOS modules, instead
5//! of using libc and system calls.
6//!
7//! ## Cargo Features
8//!
9//! - CPU
10//!     - `smp`: Enable SMP (symmetric multiprocessing) support.
11//!     - `fp-simd`: Enable floating point and SIMD support.
12//! - Interrupts:
13//!     - Interrupt handling is always available.
14//! - Memory
15//!     - `alloc`: Enable dynamic memory allocation.
16//!     - `paging`: Enable page table manipulation.
17//!     - `tls`: Enable thread-local storage.
18//! - Task management
19//!     - Multi-threading and timer-driven scheduling are always available.
20//! - Upperlayer stacks
21//!     - `fs`: Enable file system support.
22//!     - `ext4fs`: Enable the ext4 filesystem.
23//!     - `fatfs`: Enable the FAT filesystem.
24//!     - `net`: Enable networking support.
25//!     - `dns`: Enable DNS lookup support.
26//!     - `display`: Enable graphics support.
27//! - Device drivers are selected directly through `ax-driver/*` features by
28//!   board configurations.
29//!
30//! [ArceOS]: https://github.com/arceos-org/arceos
31
32#![cfg_attr(all(not(test), not(doc)), no_std)]
33#![cfg_attr(doc, feature(doc_cfg))]
34
35extern crate alloc;
36extern crate ax_driver as _;
37
38#[cfg(feature = "alloc")]
39#[doc(no_inline)]
40pub use alloc::{boxed, collections, format, string, vec};
41#[doc(no_inline)]
42pub use core::{arch, cell, cmp, hint, marker, mem, ops, ptr, slice, str};
43
44#[macro_use]
45mod macros;
46mod error;
47
48pub use error::{StdError, StdResult};
49
50pub mod env;
51pub mod io;
52pub mod os;
53pub mod process;
54pub mod sync;
55pub mod thread;
56pub mod time;
57
58#[cfg(feature = "fs")]
59pub mod fs;
60#[cfg(feature = "net")]
61pub mod net;