rchess

Crates.iorchess
lib.rsrchess
version2.0.0
sourcesrc
created_at2024-08-24 19:47:20.670162
updated_at2024-11-14 20:34:58.523101
descriptionA Chess Library Written In Rust
homepage
repositoryhttps://github.com/Shadowcat650/rchess
max_upload_size
id1350523
size200,471
(Shadowcat650)

documentation

https://docs.rs/rchess/2.0.0/rchess/

README

rchess

A Chess Library Written in Rust


rchess is a Rust-based library designed for applications that need to work with chess games or boards, such as UCI GUIs or online chess platforms.

If you encounter any bugs, have suggestions for improving code readability or performance, or would like to contribute, we encourage you to create a pull request. For significant API changes or feature requests, please open an issue on GitHub.


Getting Started

Documentation for rchess can be found here.

Installation

Add the following to your Cargo.toml:

[dependencies]
rchess = "2.0.0"

Usage Example

use rchess::ChessGame;

fn main() {
    // Create a new chess game.
    let mut game = ChessGame::new();
    
    // Get the legal moves for the current position.
    let moves = game.moves();
    
    // Make a move.
    game.make_move(moves[0]);
}

Improving Build Time

To improve the slow build time, which is caused by generating bitboard magics, set your build override opt-level to 3.

[profile.dev.build-override]
opt-level = 3

[profile.test.build-override]
opt-level = 3

[profile.release.build-override]
opt-level = 3

Contributing

We welcome contributions! Please adhere to the following guidelines:

  • Bug Reports & Feature Requests: Open an issue on the GitHub Issues page.
  • Code Contributions: Fork the repository and create a pull request.

License

This project is dual-licensed under the MIT and APACHE 2.0 licenses.


Commit count: 38

cargo fmt