Skip to content

litchee 0.1.0

Latest

Choose a tag to compare

@obazin obazin released this 15 Jun 14:16
· 11 commits to main since this release

First release of litchee — an async, builder-pattern Rust client for the Lichess API, published to crates.io.

Highlights

  • Full API coverage — all 184 documented Lichess operations across 24 tags (users, social, tournaments, training, broadcasting, database, gameplay, engine), each reached through a typed accessor on the client.
  • Async & streaming-native — built on tokio + reqwest (rustls); NDJSON endpoints (event streams, board/bot game state, game exports, TV feeds) return a Stream you consume directly.
  • "Log in with Lichess" — first-class OAuth2 Authorization Code flow with PKCE, plus personal access tokens. Tokens are held in a Secret wrapper that redacts them from Debug.
  • Typed end to end — every DTO is prefixed Lichess*; every failure maps to a specific, matchable LichessError variant.
  • Resilient by configuration — tunable connect/read timeouts, a bounded NDJSON line buffer (DoS guard), and an opt-in RetryPolicy for rate-limited (429) requests that honours Retry-After.

Getting started

```toml
[dependencies]
litchee = "0.1"
tokio = { version = "1", features = ["full"] }
futures-util = "0.3"
```

See the examples/ directory — including oauth_flow, an end-to-end "Log in with Lichess" demo — and the PKCE guide.

MSRV: Rust 1.95 (edition 2024).