rusqlite

An ergonomic, safe Rust wrapper around SQLite with typed rows and prepared statement caching.

Library
Cargo
v0.40.2
4,411 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
88 /100 Excellent
Development Activity 96
Maintenance 84
Community 72
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 88
Code Quality 90
Innovation 82
Learning Curve 85

rusqlite is the de facto standard Rust binding for SQLite, wrapping the C API in a safe, idiomatic interface built on top of the companion libsqlite3-sys crate. It exposes connections, prepared statements, transactions, and typed row/parameter conversion via FromSql/ToSql traits, letting applications read and write SQLite databases without hand-rolling FFI calls.

The crate is feature-gated so consumers only pay for what they use: optional support for blobs, backups, user-defined functions, collations, virtual tables, tracing hooks, and a bundled feature that compiles and statically links an up-to-date SQLite from source, sidestepping mismatched system library versions. This design has made it the go-to embedded-database driver across CLI tools, desktop apps, and services built in Rust.

What You Get

  • A safe Connection type wrapping SQLite’s C API with automatic resource cleanup
  • Typed row and parameter conversion via FromSql/ToSql, including support for chrono, time, jiff, uuid, and serde_json types behind feature flags
  • Prepared statement execution and caching for repeated queries
  • Transactions and savepoints with RAII-style commit/rollback semantics
  • A bundled feature that compiles SQLite (or SQLCipher) from source, avoiding system library version mismatches
  • Optional support for blobs, online backup, user-defined functions, collations, virtual tables, and tracing/profiling hooks

Common Use Cases

  • Embedding a zero-configuration relational database in CLI tools and desktop applications
  • Local caching or offline-first data storage for services that sync to a remote database
  • Prototyping data models with a real SQL engine before migrating to Postgres/MySQL
  • Building custom SQLite extensions or virtual tables directly in Rust

Under The Hood

Architecture — rusqlite is a thin, safe façade over libsqlite3-sys, a sibling crate in the same Cargo workspace that generates raw FFI bindings to SQLite’s C API. Connection wraps a raw sqlite3* handle (inner_connection.rs), Statement/raw_statement.rs wrap prepared statements, and row.rs/column.rs provide zero-copy row access with lazy column decoding. Unsafe FFI calls are isolated to a small surface (errmsg_to_string, unsafe impl Send for Connection, blob/backup/session modules) so application code never touches raw pointers directly. Tech Stack — pure Rust (99.5% of the codebase) targeting the 2024 edition, with the bundled feature invoking the cc crate to compile SQLite/SQLCipher from vendored C source at build time; optional integrations add chrono, time, jiff, uuid, and serde_json conversions behind Cargo features so unused dependencies aren’t compiled in. Code Quality — the tests/ directory and inline #[test] modules throughout src/ cover connection lifecycle, transactions, virtual tables, and extension loading; CI badges (GitHub Actions, AppVeyor, Codecov, deps.rs) indicate active cross-platform testing and dependency monitoring. Errors are modeled via a dedicated error.rs with a rich Error enum rather than panics, and the crate has maintained API stability across 40+ releases since 2014. API Design — the API mirrors rust-postgres idioms (query_map, execute, positional/named parameters via tuples or &[&dyn ToSql]), keeping the learning curve low for Rust developers already familiar with that ecosystem; the README’s quickstart example demonstrates a working CREATE/INSERT/SELECT round-trip in under 20 lines, and cargo feature flags let users opt into exactly the surface area (blobs, hooks, vtab, bundled builds) their project needs.

Used by 22 apps in this directory

TypeScript
54%
MIT

Anarlog

AI Assistants · Note Taking · Productivity

9,404

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
68
Dependency
Built with
TypeScript 54%
Rust 34%
Updated 5 days ago
Dart
74%
AGPL 3.0

AppFlowy

AI Assistants · Collaboration · Productivity

76,967

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
66
Repo Health
81
Technical
67
Dependency
Built with
Dart 74%
Rust 24%
Updated 1 weeks ago
Dart
74%
AGPL 3.0

AppFlowy

AI Assistants · Collaboration · Productivity

76,967

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
66
Repo Health
81
Technical
67
Dependency
Built with
Dart 74%
Rust 24%
Updated 1 weeks ago
Rust
54%
Other

Cameleer

AI Agents

23

A local-first desktop workspace for managing AI agents in an enterprise-style workflow — agent directory, Kanban task tracking, workspace chat, and a full runtime/audit log of agent actions and tool approvals.

View details
40
Repo Health
65
Technical
76
Dependency
Built with
Rust 54%
JavaScript 24%
TypeScript 15%
Updated 2 months ago
Rust
95%
MIT

claw-code

AI Agents · AI Code Assistants

195,291

A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.

View details
51
Repo Health
71
Technical
77
Dependency
Built with
Rust 95%
Updated 1 months ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,049

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
73
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 6 days ago
TypeScript
64%
Other

Epicenter

Developer Tools · Knowledge Management · Note Taking

4,808

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
88
Repo Health
90
Technical
64
Dependency
Built with
TypeScript 64%
HTML 13%
Svelte 13%
Updated 6 days ago
Rust
59%
MIT

Handy

Productivity · Voice AI

32,320

Free, offline, open-source speech-to-text that pastes directly into any app on Windows, macOS, and Linux.

View details
87
Repo Health
78
Technical
72
Dependency
Built with
Rust 59%
TypeScript 30%
Updated 5 days ago
Python
82%
Apache 2.0

headroom

AI Development · Developer Tools

73,966

Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.

View details
85
Repo Health
86
Technical
69
Dependency
Built with
Python 82%
Rust 12%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers