Rust Encyclopaedia of Chess Openings.
This crate is an implementation of the ECO database using shakmaty for relevant types.
Contains:
- Types to represent each part of an ECO entry.
- ECO entries as statics, sourced from lichess-org/chess-openings.
no-std and no-alloc compatible.
alloc(default): adds functionality which requiresalloc.std(default): adds functionality which requiresstd. Huge performance increase when usingfind_line_from_setup. Most notably, it adds a lazily evaluatedbook::SETUP_TO_LINEstatic that mapsshakmaty::Setups toLines drastically improving opening lookup time.book(default): adds ECO entries as statics.book-flattened: adds a compile time evaluatedbook::FLATTENEDstatic that flattens the tree structure ofbook::ALL.serde: addsserdesupport for applicable types. All implementations are derived with no parameters. This includes types that have aFromStrandDisplayimplementation.arbitrary: addsarbitrarysupport. Requiresstd.proptest: addsproptestsupport. Requiresstd.
The ECO entries are generated using the unpublished librarian crate.
To make sure they are up to date, there's a workflow that runs librarian every day and makes a PR if any changes are detected.
See librarian's README for information about running.
reco declares #![forbid(unsafe_code)].
If you clone this repository, exclude the src/book_gen directory from your IDE.
Open the files in there with a well optimized text editor.