Skip to main content

lumifox_chess/
lib.rs

1/*
2 * A high-performance chess library licensed under the LGPLv3.
3 * Copyright (C) 2025 Clifton Toaster Reid
4 *
5 * This library is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library. If not, see <https://opensource.org/license/lgpl-3-0>.
17 */
18
19#![cfg_attr(not(any(test, feature = "std")), no_std)]
20
21//! Lumifox Chess — high-performance chess primitives
22//!
23//! This crate provides low-level, high-performance chess primitives suitable for
24//! building engines, UCI adapters, or analysis tools. It focuses on compact
25//! bitboard representations, efficient move generation, and no_std friendliness
26//! when the `std` feature is disabled.
27//!
28//! Key modules
29//! - `model` — board and piece representations (bitboards, moves, game state)
30//! - `movegen` — move generation for all piece types (fast, allocation-free)
31//! - `legal` — move legality checks and attack detection
32//! - `constants` — shared constants such as square indices and masks
33//! - `errors` — crate-specific error types
34//!
35//! Example
36//! ```rust
37//! use lumifox_chess::model::gameboard::GameBoard;
38//! use lumifox_chess::movegen::generate_moves;
39//!
40//! // Create a starting position and generate moves (API is intentionally low-level)
41//! let board = GameBoard::startpos();
42//! let (moves, count) = generate_moves(&board);
43//! assert!(count > 0);
44//! ```
45//!
46//! For higher-level documentation and usage examples see the crate README at
47//! <https://github.com/ArchProtogens/lumifox/tree/main/modules/chess>
48
49pub mod constants;
50pub mod errors;
51pub mod legal;
52pub mod model;
53pub mod movegen;