Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

prsqlite

> 数据库
Open source

Pure Rust implementation of SQLite

603 stars0 likes1 views
WebsiteGitHub

About

Pure Rust implementation of SQLite

prsqlite - Pure Rust SQLite

Pure Rust implementation of SQLite.

This is WIP and my hobby project.

  • Compatible with database file generated by sqlite3
    • prsqlite uses the SQLite Database File Format.
  • Support SQL syntax which SQLite supports
    • See SQL As Understood By SQLite.
    • Some syntax is not implemented yet.
  • Zero dependency
    • except dev-dependency.
    • While developing as WIP, prsqlite is using anyhow for development velocity. It will be replaced with a proprietary errors in the future.
  • Validating file format
    • prsqlite does not trust the file is valid unlike sqlite3 and validates pages in the file while parsing.
    • trust-file feature will be added to disable the file validation.
  • No unsafe
    • Will provide unsafe feature for better performance.

NOTE: This repository is not stable yet. I may force-push commit tree even on the main branch.

Usage

See integration_test.rs for what prsqlite supports.

prsqlite::Connection::open() is the entrypoint interface for library users.

rust
use std::path::Path;

use prsqlite::Connection;
use prsqlite::Value;

let conn = Connection::open(Path::new("path/to/sqlite.db")).unwrap();

let stmt = conn.prepare("INSERT INTO example (col) VALUES (1), (2);").unwrap();
assert_eq!(stmt.execute().unwrap(), 2);

let stmt = conn.prepare("SELECT * FROM example WHERE col = 1;").unwrap();
let mut rows = stmt.query().unwrap();

let row = rows.next_row().unwrap().unwrap();
let columns = row.parse().unwrap();
assert_eq!(columns.get(0), Some(&Value::Integer(1)));
drop(row);

assert!(rows.next_row().unwrap().is_none());

prsqlite provides REPL command.

…

Contributing

See CONTRIBUTING.md for details.

License

Apache 2.0; see LICENSE for details.

Disclaimer

This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustsqlitesqlite3

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库