2 releases

0.1.1 Oct 31, 2024
0.1.0 Apr 20, 2024

#658 in Game dev

Download history 6/week @ 2024-09-19 9/week @ 2024-09-26 8/week @ 2024-10-03 1/week @ 2024-10-10 138/week @ 2024-10-31 1/week @ 2024-11-07

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