| Crates.io | llkv-sql-pong-demo |
| lib.rs | llkv-sql-pong-demo |
| version | 0.8.5-alpha |
| created_at | 2025-11-07 16:34:37.73754+00 |
| updated_at | 2025-12-03 13:57:02.7083+00 |
| description | Watch a terminal play pong against itself using the LLKV SQL engine in a game loop. Mainly for perf evaluation. |
| homepage | |
| repository | https://github.com/jzombie/rust-llkv |
| max_upload_size | |
| id | 1921824 |
| size | 115,804 |
A terminal UI (TUI) app that plays a game of Pong against itself.
Most of the game logic is implemented in SQL so this demo can be used to evaluate and benchmark the SQL engine in the LLKV toolkit.
Run the demo from the workspace root:
cargo run -p llkv-sql-pong-demo --release
The framerate controls let you stress-test LLKV's query execution speed:
Each frame executes a complete SQL query with multiple subqueries handling "AI" decisions, physics, collision detection, and scoring. The framerate controls make this demo useful for benchmarking SQL execution performance under different workloads, though MAX mode measures end-to-end loop time including UI rendering.
Note: Compiling for release mode (
--release) will give much better framerates. Debug builds are significantly slower.

This code is a modified version of https://github.com/Zeutschler/duckdb-pong-in-sql, ported to Rust, and the SQL queries have been substantially modified along the way.
Licensed under the Apache-2.0 License.