2 releases

0.1.1 Oct 31, 2024
0.1.0 Apr 20, 2024

#654 in Game dev

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
~35K SLoC