1 unstable release

0.1.0 Apr 20, 2024

#695 in Game dev

Download history 122/week @ 2024-04-17 10/week @ 2024-04-24

132 downloads per month

GPL-3.0+

94KB
2.5K SLoC

shakmaty-uci

A Rust library to parse and write Universal Chess Interface (UCI) messages.

Contributing

This library is Free Software and every contributions are welcome.

Please note that contributing to this project is subject to a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


lib.rs:

A library to parse and write Universal Chess Interface (UCI) message.

Examples

Ask the engine to evaluate a position:

use shakmaty_uci::UciMessage;

println!("{}", UciMessage::Uci); // uci
assert_eq!("uciok".parse(), Ok(UciMessage::UciOk));
println!(
    "{}",
    UciMessage::Position{
        startpos: true,
        fen: None,
        moves: vec![
            "e2e4".parse().unwrap(),
            "e7e5".parse().unwrap(),
            "g8f3".parse().unwrap(),
        ],
    }
);
println!("{}", UciMessage::go_infinite())

Dependencies

~2MB
~36K SLoC