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//! These features are exactly the same as those in [ax-feat], they are used to
8//! provide users with the selection of features in ax-feat, without import
9//! [ax-feat] additionally:
10//!
11//! ## Cargo Features
12//!
13//! - CPU
14//! - `smp`: Enable SMP (symmetric multiprocessing) support.
15//! - `fp-simd`: Enable floating point and SIMD support.
16//! - Interrupts:
17//! - `irq`: Enable interrupt handling support.
18//! - Memory
19//! - `alloc`: Enable dynamic memory allocation.
20//! - `alloc-tlsf`: Use the TLSF allocator.
21//! - `alloc-slab`: Use the slab allocator.
22//! - `alloc-buddy`: Use the buddy system allocator.
23//! - `paging`: Enable page table manipulation.
24//! - `tls`: Enable thread-local storage.
25//! - Task management
26//! - `multitask`: Enable multi-threading support.
27//! - `sched-fifo`: Use the FIFO cooperative scheduler.
28//! - `sched-rr`: Use the Round-robin preemptive scheduler.
29//! - `sched-cfs`: Use the Completely Fair Scheduler (CFS) preemptive scheduler.
30//! - Upperlayer stacks
31//! - `fs`: Enable file system support.
32//! - `net`: Enable networking support.
33//! - `dns`: Enable DNS lookup support.
34//! - `display`: Enable graphics support.
35//! - Device drivers
36//! - `bus-mmio`: Use device tree to probe all MMIO devices.
37//! - `bus-pci`: Use PCI bus to probe all PCI devices.
38//! - `driver-ramdisk`: Use the RAM disk to emulate the block device.
39//! - `driver-ixgbe`: Enable the Intel 82599 10Gbit NIC driver.
40//! - `driver-bcm2835-sdhci`: Enable the BCM2835 SDHCI driver (Raspberry Pi SD card).
41//!
42//! [ArceOS]: https://github.com/arceos-org/arceos
43
44#![cfg_attr(all(not(test), not(doc)), no_std)]
45#![cfg_attr(doc, feature(doc_cfg))]
46
47#[cfg(feature = "alloc")]
48extern crate alloc;
49
50#[cfg(feature = "alloc")]
51#[doc(no_inline)]
52pub use alloc::{boxed, collections, format, string, vec};
53#[doc(no_inline)]
54pub use core::{arch, cell, cmp, hint, marker, mem, ops, ptr, slice, str};
55
56#[macro_use]
57mod macros;
58
59pub mod env;
60pub mod io;
61pub mod os;
62pub mod process;
63pub mod sync;
64pub mod thread;
65pub mod time;
66
67#[cfg(feature = "fs")]
68pub mod fs;
69#[cfg(feature = "net")]
70pub mod net;