# rusqlite/rusqlite

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/rusqlite-rusqlite).**

4,058 stars · 447 forks · Rust · mit

## Links

- GitHub: https://github.com/rusqlite/rusqlite
- awesome-repositories: https://awesome-repositories.com/repository/rusqlite-rusqlite.md

## Topics

`bindings` `rust` `sqlite` `wrapper`

## Description

Rusqlite is an embedded database interface and relational database driver that provides a client library for interacting with SQLite. It functions as an SQL query wrapper, enabling the management of local file-based or in-memory databases through a safe interface.

The library allows for the extension of native database capabilities by implementing custom scalar functions, collations, and virtual tables. It also supports the embedding of the database engine directly into the application binary to remove external library dependencies.

The project covers a broad range of capabilities including atomic transaction management, prepared statement caching, and the mapping of database values to native application types. It provides utilities for online backups, database serialization, and the streaming of binary large objects.

Operational control is provided through schema inspection, resource limit management, and activity monitoring via event hooks and error logging.

## Tags

### Data & Databases

- [SQL Query Execution](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/database-operations/sql-query-execution.md) — Executes SQL queries to retrieve single records, specific rows, or complete result sets. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [SQLite Integration](https://awesome-repositories.com/f/data-databases/sqlite-integration.md) — Provides a comprehensive interface for integrating SQLite as an embedded database within Rust applications.
- [Data Type Mappings](https://awesome-repositories.com/f/data-databases/data-type-mappings.md) — Provides a type-system bridge to automate conversion between native application types and database column formats.
- [Database Connections](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/database-systems/database-connections.md) — Manages the lifecycle of opening and initializing connections to file-based or in-memory databases. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [Database Type Mappings](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/schema-management-tools/database-type-mappings.md) — Transforms language-specific types including dates and JSON into compatible database data formats. ([source](https://docs.rs/rusqlite/~0/rusqlite/types/trait.ToSql.html))
- [Row Mapping Logic](https://awesome-repositories.com/f/data-databases/database-schema-mapping/row-mapping-logic.md) — Transforms raw database rows into structured objects using custom mapping functions. ([source](https://cdn.jsdelivr.net/gh/rusqlite/rusqlite@master/README.md))
- [Database Value Conversions](https://awesome-repositories.com/f/data-databases/database-value-conversions.md) — Transforms database values into native language types including dates, UUIDs, and JSON. ([source](https://docs.rs/rusqlite/~0/rusqlite/types/trait.FromSql.html))
- [Embedded Databases](https://awesome-repositories.com/f/data-databases/embedded-databases.md) — Functions as a lightweight embedded database engine bundled directly into the application binary.
- [Named Parameter Bindings](https://awesome-repositories.com/f/data-databases/named-parameter-bindings.md) — Maps variables to placeholders using macros to simplify the preparation and execution of SQL queries. ([source](https://docs.rs/rusqlite/~0/rusqlite/macro.prepare_and_bind.html))
- [Prepared Statements](https://awesome-repositories.com/f/data-databases/prepared-statements.md) — Compiles queries into reusable statements with bound variables to improve execution performance. ([source](https://docs.rs/rusqlite/0.40.1/rusqlite/))
- [Query Execution Optimizations](https://awesome-repositories.com/f/data-databases/query-execution-optimizations.md) — Implements performance optimizations including prepared statements and lazy row streaming to minimize resource consumption.
- [Relational Database Drivers](https://awesome-repositories.com/f/data-databases/relational-database-drivers.md) — Acts as a relational database driver managing connections, transactions, and prepared statements for SQLite.
- [Relational Database Persistence](https://awesome-repositories.com/f/data-databases/relational-database-persistence.md) — Enables relational data persistence using SQL queries and atomic transactions to maintain data integrity.
- [Row-Based Result Streaming](https://awesome-repositories.com/f/data-databases/row-based-result-streaming.md) — Streams database records sequentially using lazy iteration to minimize memory consumption for large datasets.
- [SQL Execution Interfaces](https://awesome-repositories.com/f/data-databases/sql-execution-interfaces.md) — Executes database commands with custom parameters to modify data and retrieve affected row counts. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [SQL Query Interfaces](https://awesome-repositories.com/f/data-databases/sql-query-interfaces.md) — Provides an ergonomic SQL query wrapper for executing statements and mapping result rows to native types.
- [SQLite Drivers](https://awesome-repositories.com/f/data-databases/sqlite-drivers.md) — Offers a safe and ergonomic set of Rust bindings for interacting with SQLite databases.
- [Transaction Management](https://awesome-repositories.com/f/data-databases/transaction-management.md) — Implements RAII-based transaction management that automatically triggers rollbacks if a transaction is dropped.
- [Streaming I/O](https://awesome-repositories.com/f/data-databases/data-i-o/streaming-i-o.md) — Implements streaming I/O to read, write, and seek binary large objects without loading them entirely into memory. ([source](https://cdn.jsdelivr.net/gh/rusqlite/rusqlite@master/README.md))
- [Database Backup and Restoration](https://awesome-repositories.com/f/data-databases/database-backup-and-restoration.md) — Provides utilities for online backups and database serialization to ensure data persistence and security.
- [Database Backups](https://awesome-repositories.com/f/data-databases/database-backups.md) — Provides utilities to save the current database to a specified path with optional progress tracking. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [Prepared Statement Engines](https://awesome-repositories.com/f/data-databases/database-drivers/prepared-statement-engines.md) — Stores compiled SQL statements for reuse to eliminate the overhead of repeated query preparation. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [Database Event Hooks](https://awesome-repositories.com/f/data-databases/database-event-hooks.md) — Implements callbacks for commit, rollback, and data change notifications to monitor database activity. ([source](https://cdn.jsdelivr.net/gh/rusqlite/rusqlite@master/README.md))
- [Table Metadata Inspection](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/database-management/schema-designers/table-schemas/table-metadata-inspection.md) — Provides capabilities to inspect table schemas, verify column existence, and retrieve metadata constraints. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [Database Restoration Tools](https://awesome-repositories.com/f/data-databases/database-restoration-tools.md) — Provides utilities to populate the current database from a source path with optional progress tracking. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [Database Serializations](https://awesome-repositories.com/f/data-databases/database-serializations.md) — Enables converting a database into a byte stream or restoring a database from a byte stream. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [Binary Object Storage](https://awesome-repositories.com/f/data-databases/object-storage-services/binary-object-chunkers/binary-object-storage.md) — Handles large binary data blobs through streaming I/O traits to minimize memory usage.
- [Custom SQL Functions](https://awesome-repositories.com/f/data-databases/sql-aggregate-functions/custom-sql-functions.md) — Extends SQLite functionality by implementing custom scalar functions, collations, and virtual tables using Rust logic.
- [User-Defined Functions](https://awesome-repositories.com/f/data-databases/user-defined-functions.md) — Supports the creation of user-defined functions to implement custom logic within SQL queries. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
- [Virtual Tables](https://awesome-repositories.com/f/data-databases/virtual-tables.md) — Implements virtual tables to map external data sources into the database schema as queryable tables. ([source](https://docs.rs/rusqlite/latest/rusqlite/))

### Programming Languages & Runtimes

- [C-API Wrappers](https://awesome-repositories.com/f/programming-languages-runtimes/c-api-wrappers.md) — Provides an ergonomic object-oriented wrapper layer around low-level C functions of the SQLite engine.
- [Function-Pointer Callbacks](https://awesome-repositories.com/f/programming-languages-runtimes/function-pointer-callbacks.md) — Allows registering native application functions as callbacks that the database engine invokes during query execution.
- [External Library Linking](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/foreign-function-interfaces/native-library-integrations/external-library-linking.md) — Supports both bundling the database engine into the binary and linking to shared system libraries at runtime.

### Software Engineering & Architecture

- [Custom Database Type Bindings](https://awesome-repositories.com/f/software-engineering-architecture/typed-data-binding/custom-database-type-bindings.md) — Serializes and deserializes complex types such as UUIDs, JSON, and timestamps to and from database columns. ([source](https://cdn.jsdelivr.net/gh/rusqlite/rusqlite@master/README.md))

### Development Tools & Productivity

- [Engine Bundling](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-configuration-systems/library-bundling-configurations/shared-library-bundling/engine-bundling.md) — Embeds the database engine directly into the binary to remove external library dependencies. ([source](https://cdn.jsdelivr.net/gh/rusqlite/rusqlite@master/README.md))

### Security & Cryptography

- [Table-Level Locks](https://awesome-repositories.com/f/security-cryptography/row-level-security/concurrency-locking/table-level-locks.md) — Configures busy timeouts and callbacks to handle responses when database tables are locked. ([source](https://docs.rs/rusqlite/~0/rusqlite/struct.Connection.html))
