百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

prsqlite

> 数据库
开源

纯 Rust 实现的 SQLite

603 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

纯 Rust 实现的 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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustsqlitesqlite3

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

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