ostool/lib.rs
1//! # ostool
2//!
3//! A comprehensive toolkit for operating system development.
4//!
5//! `ostool` provides utilities for building, running, and debugging operating systems,
6//! with special support for embedded systems and bootloader interaction.
7//!
8//! ## Features
9//!
10//! - **Build System**: Cargo-based build configuration with customizable options
11//! - **QEMU Integration**: Easy QEMU launching with various architectures support
12//! - **U-Boot Support**: Serial communication and file transfer via YMODEM
13//! - **TFTP Server**: Built-in TFTP server for network booting
14//! - **Menu Configuration**: TUI-based configuration editor (like Linux kernel's menuconfig)
15//! - **Serial Terminal**: Interactive serial terminal for device communication
16//!
17//! ## Modules
18//!
19//! - [`build`] - Build system configuration and Cargo integration
20//! - [`ctx`] - Application context and state management
21//! - [`menuconfig`] - TUI-based menu configuration
22//! - [`run`] - QEMU, TFTP, and U-Boot runners
23//! - [`sterm`] - Serial terminal implementation
24//! - [`utils`] - Common utilities and helper functions
25//!
26//! ## Example
27//!
28//! ```rust,no_run
29//! // ostool is primarily used as a CLI tool
30//! // See the binary targets for usage examples
31//! ```
32
33#![cfg(not(target_os = "none"))]
34
35/// Build system configuration and Cargo integration.
36///
37/// Provides functionality for configuring and executing Cargo builds
38/// with custom options and target specifications.
39pub mod build;
40
41/// Application context and state management.
42pub mod ctx;
43
44/// TUI-based menu configuration system.
45///
46/// Similar to Linux kernel's menuconfig, allows users to configure
47/// build options through an interactive terminal interface.
48pub mod menuconfig;
49
50/// Runtime execution modules for QEMU, TFTP, and U-Boot.
51///
52/// Contains implementations for launching QEMU instances,
53/// running TFTP servers, and communicating with U-Boot.
54pub mod run;
55
56/// Serial terminal implementation.
57///
58/// Provides an interactive serial terminal for communication
59/// with embedded devices and development boards.
60pub mod sterm;
61
62/// Common utilities and helper functions.
63pub mod utils;
64
65#[macro_use]
66extern crate log;
67#[macro_use]
68extern crate anyhow;
69
70pub use jkconfig::cursive;