| Crates.io | sqlite-fsr |
| lib.rs | sqlite-fsr |
| version | 1.0.19 |
| created_at | 2025-11-21 19:22:50.165852+00 |
| updated_at | 2025-11-23 20:11:45.691427+00 |
| description | A from-scratch Rust implementation of a minimal SQLite database. |
| homepage | |
| repository | https://github.com/from-scratch-rust/sqlite-fsr |
| max_upload_size | |
| id | 1944039 |
| size | 9,169,742 |
A small-from-scratch SQLite-like reader and SQL parser written in Rust for learning and experimentation.
This repository implements a subset of SQLite internals: parsing SQL statements, reading database file structures (pages, tables, schemas), and providing commands for basic introspection and query execution. The project is intended as an educational implementation and testing ground, not a production database.
sqlite-fsrsrc/ — crate source. Main entry is src/main.rs which calls sqlite_fsr::run.src/command/ — CLI command implementations (e.g. dbinfo, tables, sql).models/ — database file model structures (pages, records, schema parsing).utils/ — helper utilities (varint parsing, etc.).tests/ — integration and unit tests used by cargo test.You need a recent Rust toolchain (stable channel, Rust >= 1.80). To build the project:
cargo build --release
To run the binary from the workspace (debug build):
cargo run -- <args>
# example: cargo run -- dbinfo path/to/file.sqlite
Alternatively, call the library from another binary — src/main.rs calls sqlite_fsr::run.
Run the test suite with:
cargo test
There are unit and integration tests under tests/ and many builder helpers under src and models/ used by tests.
Contributions are welcome. Keep changes small and focused. If you add functionality, please include tests that exercise the new behavior.
Suggested workflow:
tests/ or unit tests next to implementation.cargo test and cargo clippy (if you use clippy) locally.This project does not include an explicit license file in the repository root. If you intend to publish or use this code outside of private experiments, consider adding a LICENSE file (for example, MIT or Apache-2.0).
This README is intentionally short and focused on getting started. If you'd like, I can expand it with:
If you want any of those, tell me which and I will add them.