NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #436 most downloaded on crates.io
Native bindings to the libsqlite3 library
Latest stable
0.40.0
Last release 11 days ago
11 Nov 2026
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 43 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
68 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Breaking changes: Replace VTab macros by constructors #1823
Full Changelog: v0.39.0...v0.40.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Fix constraints on VTab Aux data #1778 , #1771
rollback_hook docstring #1780Full Changelog: v0.38.0...v0.39.0
Nothing published for this version
Nothing published for this version
Disable u64, usize ToSql/FromSql impl by default #1732 , # #1722 (breaking change)
wasm32-unknown-unknown support #1769, #488, #827Full Changelog: v0.37.0...v0.38.0
Add FromSqlError::other convenience conversion #1703
FromSqlError::other convenience conversion #1703Full Changelog: v0.36.0...v0.37.0
Introduce Name trait to support both &str and &CStr as name #1659
loadable_extension is incompatible with some other features #1686Full Changelog: v0.35.0...v0.36.0
Breaking change: Check that Connection::execute has no tail #1679 / #397
Timestamp #1676Full Changelog: v0.34.0...v0.35.0
Find the system library with minimum version 3.14.0 #1628
ValueRef methods #1629Full Changelog: v0.33.0...v0.34.0
Remove lazy_static dependency #1550
impl FromSql for various heap-allocated string and blob slices #15584.6.1 (SQLite 3.46.1) #1566wasm32-wasip(\d) targets not enabling wasi compile flags in bundled mode. #1569wal_hook #1595arg is out-of-range for auxiliary data #1607Full Changelog: v0.32.1...v0.33.0
Remove obsolete codes and comments #1458
total_changes() #1461RawStatement#clear_bindings #1465sqlite3_is_interrupted #1468CStr::to_str where possible #1470sqlite3_db_name #1471Connection::db_name #1476Connection::backup/restore #1482SQLITE_OPEN_EXRESCODE by default #1485Ref/UnwindSafe constraint on FFI callback #1488catch_unwind in init_auto_extension #1489preupdate hook #1486, #897Connection::extension_init2 #1494Full Changelog: https://github.com/rusqlite/rusqlite/compare/v0.31.0...v0.32.0
Check sqlite3_reset result #1419
#[derive(Clone, Copy... on all bitflags #1396Full Changelog: https://github.com/rusqlite/rusqlite/compare/v0.30.0...v0.31.0
Nothing published for this version
[breaking change] Update edition from 2018 to 2021 #1267
time types #1374Full Changelog: https://github.com/rusqlite/rusqlite/compare/v0.29.0...v0.30.0
Add bindings to automatic extension loading API #1487
SqliteMallocString by @thomcc in https://github.com/rusqlite/rusqlite/pull/1228grcov for code coverage by @thomcc in https://github.com/rusqlite/rusqlite/pull/1274Full Changelog: https://github.com/rusqlite/rusqlite/compare/v0.28.0...v0.29.0
Improve wasm32-wasi support #1332
Params for tuples, improve documentation some. #1133sqlite3_changes (or sqlite3_changes64 if available) #1152Error methods to get SQLite error values by #1158Connection::release_memory method #1164Eq for Type #1165Debug for Savepoint #1179Full Changelog: https://github.com/rusqlite/rusqlite/compare/v0.27.0...v0.28.0
Fix documentation typo for rollback_hook #1051
rollback_hook #1051lazy_static dependency for vtab #1063series with official source by #1064modern-full feature for docs.rs #1066Connection::transaction doc #1067ToSql/FromSql for [u8; N] #1069unlock_notify code a bit #1077buildtime_bindgen tests on windows CI #1090Limits enum from libsqlite3-sys into rusqlite #1096config::DbConfig::SQLITE_DBCONFIG_RESET_DATABASE #1113Full Changelog: https://github.com/rusqlite/rusqlite/compare/v0.26.3...v0.27.0
Breaking changes: Add support for authorizer hook #946 / #975 Action is not visible from root anymore
Nice to have: make possible to remove authorizer hook
bundle-sqlcipher and bundle-ssl #860Action is not visible from root anymoreConnection #963 / #962ValueRef, regardless of if its Text or Blob #983Send + Sync #1005ToSql param in pragma functions #1009AsRef<Statement> for Row(s) #887
Rows::column* and Row::column* removed now that you have access to underlying statement.FromSql impl for OffsetDateTime #970
time crate to version 0.3.0load_extension unsafe #1016as_type_or_null to ValueRef #1012pkg-config version #960sqlite3_db_cacheflush via Connection #984 / #985#[doc(cfg)] instead of manually indicating feature = "blah" in the comments #835 / #973env::var instead of cfg in some cases in build.rs #961time back to modern-full feature #969InnerConnection decode_result / changes #974 / #931bindgen to version 0.59 #994Bumped bundled version of SQLcipher to 4.5.2, equivalent to SQLite 3.39.2, which contains a fix for CVE-2022-35737.
Bumped bundled version of SQLcipher to 4.5.2, equivalent to SQLite 3.39.2, which contains a fix for CVE-2022-35737.
Note that the bundled SQLite already contained this fix, in 0.25.1. (If you do not use the bundled-sqlcipher feature, you do not need this change).
Note: rusqlite v0.25.2 has been yanked because it accidentally enabled bundled-full as a default feature. v0.25.3 has been cut that is equivalent but without that change. The libsqlite3-sys release that happened at the same time is still fine.
This release is a patch release that enables builds on some older versions of Rust. Rusqlite does not commit to a particular MSRV, but this release is known to work at least back to Rust 1.41.0.
It is likely that the next release will require a newer version of Rust, whether or not it is mentioned in the release notes.
Bumped bundled version of SQLite to 3.39.2. See official release notes for further information: .
Bumped bundled version of SQLite to 3.39.2. See official release notes for further information: https://www.sqlite.org/releaselog/3_39_2.html.
BREAKING CHANGE: Overhaul parameter API #830 / #609
ToSql implementations for u64 and usize #826 / #821FromSql for u64, usize and f32, and ToSql for f32 #823 / #822 / #821create_scalar_function #825Batch iterator #824 / #803#[inline] and #[cold] in far more places #834optional() requires import of trait rusqlite::OptionalExtension #842time to appease deps.rs #849get_connection method to function context #867get_raw to get_ref_unwrap and get_raw_checked to get_ref #838v0.24.2 is identical to v0.24.1 except it allows building with an older version of smallvec, as the newer one caused meaningful performance issues in
v0.24.2 is identical to v0.24.1 except it allows building with an older version of smallvec, as the newer one caused meaningful performance issues in Firefox.
See https://github.com/rusqlite/rusqlite/pull/855 for more info.
This release contains an update to the bundled version of SQLcipher, and no other changes. The update moves it to SQLcipher v4.5.1, which is equivalen
This release contains an update to the bundled version of SQLcipher, and no other changes. The update moves it to SQLcipher v4.5.1, which is equivalent to SQLite 3.37.2. (The version of SQLcipher bundled previously was v4.5.0, equivalent to SQLite 3.36.0)
Note that this is still a version behind the copy of "plain" SQLite we pull in under features = ["bundled"], which is SQLite 3.38.0.
There is no corresponding rusqlite release, as this will trickle out out over time, and Rusqlite itself does not care about the version change. That said, if you use rusqlite, and absolutely must ensure you have this change, it should be sufficient to run cargo update in the rusqlite-using workspace, which will update the version in your Cargo.lock file. You may instead add a direct dependency on libsqlite3-sys = "0.24.1" to your Cargo.toml, in case relying on Cargo.lock for this is undesirable.
The lru-cache crate has been replaced with hashlink, which may fix panics on Rust nightly caused by unsoundness in some versions of the lru-cache crate (#811).
A positional BLOB I/O API has been added, which more closely mirrors SQLites actual BLOB I/O api, and is similar to unix-style pwrite/pread. (#780).
A winsqlite3 feature as been added to both rusqlite and libsqlite3-sys which allows linking against the SQLite present in newer versions of Windows 10 (#796).
Rusqlite's iterator types are now #[must_use] (#799).
Several dependencies have been updated.
BREAKING CHANGE: Upgrade to time v0.2 and put it behind a feature flag
time v0.2 and put it behind a feature flag (#653)TryFrom<&Row<'_>> for (...)
This change implements TryFrom<&Row> for tuples up to 16 fields. This
is a convenience function that can be used to map rows more easily.SQLITE_OMIT_DECLTYPE (feature column_decltype)LIBSQLITE3_FLAGS hook
Enables compiling bundled sources with different flags.sqlite3_execwhich supports unlock notify (#767)InvalidParameterCount message (#779)MapHAVE_LOCALTIME_R)preupdate_hook feature requires buildtime_bindgenNothing published for this version
Hotfix release for arm32 bustage
Hotfix release for arm32 bustage (#724)
It's a major release as these APIs were fundamentally unsound and could not be fixed without breaking changes.
The release primarily contains a number of security/memory safety fixes, which were mostly found due to an audit of the unsafe code in the crate. An advisory will be published for these shortly.
They mostly impact APIs exposed through features, so while there are a lot of them, if you're using rusqlite under default features, you're fine. None of them impact libsqlite3-sys.
It's a major release as these APIs were fundamentally unsound and could not be fixed without breaking changes.
unsafe trait as implementing them on the wrong type is unsound https://github.com/rusqlite/rusqlite/commit/c9ef5bd63cad5c0c123344c072b490a1a9bcbe1f. (Note that a safe VTab API is planned in the future).create_module take a &'static Module as that's what the reference was treated as. https://github.com/rusqlite/rusqlite/commit/3c6b57fe1b2cc87e7ebecde43dd836ffb1c4ea5cUnlockNotification hold the Mutex while notifying the CondVar. Also, ensure &mut is not used to reference a value shared across another thread. https://github.com/rusqlite/rusqlite/commit/45fd77ee43c38eea4d6f4e2e56c1667a55ec654fNon-safety changes in this release:
Compare
Compare
Nothing published for this version
Add ability to open sqlite connection with specified vfs
Connection::busy_timeout (#604)modern_sqlite and bundled features. (#613)FromSql for Box<str>, Rc<str> and Arc<str>rusqlite, hopefully fixing it (#647)IndexConstraintOp entries (#623)alloc to generate C string allocated by sqlite3 (#644)rusqlite now exposes the bundled-windows feature, forwarding to libsqlite3-sys. (#682)rusqlite::Result<T> is now defined as type Result<T, E = rusqlite::Error>. This avoids needing to access std::result::Result explicitly when rusqlite::Result is brought into scope. (#678)Rows now support mapped and and_then functions which return Iterators. This is useful if you cannot use query_map or query_and_then for some reason. (#676)#[non_exhaustive] for better extensibility. (#673)Statement apis have been added to allow separating parameter binding and statement execution. (#668)bundled-full feature now exists to enable both bundled and other features which do not conflict. It is mainly intended to improve developer ergonomics for working on rusqlite (#687)vtab_v3 and unstable are removed. The former is no longer necessary and the latter was only used for #[bench]. (#687)rusqlite::Error now implements std::error::Error::source instead of only std::error::Error::cause. Use of cause will still work, as it goes through source by default. (#683)Nothing published for this version
BREAKING CHANGE: Do not assume sqlite3_column_text is valid UTF-8.
sqlite3_column_text is valid UTF-8. (#548)Module impl Send (#543)Allow specifying both sqlcipher and bundled
impl ToSql for Box<dyn ToSql> (#500)sqlcipher and bundled (#511)Statement::columns (#494)Nothing published for this version
Nothing published for this version
Nothing published for this version
BREAKING CHANGE: Cannot insert heterogeneous elements with .execute #462 Add params/named_params macro, and expose ToSql from top level #471
ToSql from top level #471Row::get by Row::get_checked,
And rename original Row::get to Row::get_unwrap.
Stmt::query_map, Stmt::query_map_named, Stmt::query_row,
Conn::query_row and Conn::query_row_named callback parameter must return a Result.Rows implement FallibleStreamingIterator #478
Rows::next returns Result<Option<&Row<'_>>> instead of Option<Result<Row<...>>>.PartialEq for Error #416get_aux safe by storing the TypeId with the data.Connection::from_handle #453libsqlite3_sys as ffi export pub #469Debug for Transaction #470BREAKING CHANGE: Callbacks must not be able to unwind into sqlite code
OptionalExtensionfunctions and i128 featuresBREAKING CHANGE: Take IntoIterator rather than &[&ToSql]
&[&ToSql] (#312)array feature should not require bundled #384BREAKING CHANGE: ToSql implementation for time::Timespec uses RFC 3339 (%Y-%m-%dT%H:%M:%S.%fZ). Previous format was %Y-%m-%d %H:%M:%S:%f %Z.
ToSql implementation for time::Timespec uses RFC 3339 (%Y-%m-%dT%H:%M:%S.%fZ).
Previous format was %Y-%m-%d %H:%M:%S:%f %Z.Sendable and 'static.free_boxed_hook does not work for fn.sqlite3_update_hook (#260, #328), sqlite3_commit_hook and sqlite3_rollback_hook.unlock_notify feature (#294, #331).Statement::column_index case insensitive (#330).&mut Connection in Transaction.tyvar_behind_raw_pointer warnings.Connection::open documentation (#332)sqlite3_get_autocommit and sqlite3_stmt_busy.sqlite3_busy_timeout and sqlite3_busy_handler.sqlite3_expanded_sql.rerun-if-env-changed in libsqlite3-sys (#329).InvalidQuery error when SQL is not read only.Added ToSqlConversionFailure case to Error enum.
Defines HAVE\_USLEEP when building with a bundled SQLite (#263).
ToSql impls for str and [u8].Nothing published for this version
Avoid publicly exporting SQLite constants multiple times from libsqlite3-sys.
FromSql and ToSql impls for isize. Documents why usize and u64 are not included.This check can by skipped by calling the unsafe function rusqlite::bypass_sqlite_initialization(). This is technically a breaking change but is unlike…
Changes:
ErrorCode enum from libsqlite3-sys.version() and version_number() functions for querying the version of SQLite in use.limits feature, exposing limit() and set_limit() methods on Connection.libsqlite3-sys 0.7.0, which runs rust-bindgen at build-time instead of assuming the precense of all expected SQLite constants and functions.rusqlite::bypass_sqlite_initialization(). This is technically a breaking change but is unlikely to affect anyone in practice, since prior to this version the check that rusqlite was using would cause a segfault if linked against a SQLite older than 3.7.0.rusqlite::bypass_sqlite_version_check().libc dependency in favor of using std::os::rawBackport fix on SQLITE_STATIC Full Changelog: https://github.com/rusqlite/rusqlite/compare/0.14.0...sys0.9.4
Backport fix on SQLITE_STATIC
Full Changelog: https://github.com/rusqlite/rusqlite/compare/0.14.0...sys0.9.4
Make ToSqlOutput itself implement ToSql.
ToSqlOutput itself implement ToSql.BREAKING CHANGE: Connection::close() now returns a Result<(), (Connection, Error)> instead of a Result<(), Error> so callers get the still-open connec…
Connection::close() now returns a Result<(), (Connection, Error)> instead
of a Result<(), Error> so callers get the still-open connection back on failure.Nothing published for this version
Nothing published for this version
BREAKING CHANGE: The FromSql trait has been redesigned. It now requires a single, safe method instead of the previous definition which required implem…
FromSql trait has been redesigned. It now requires a single, safe
method instead of the previous definition which required implementing one or two unsafe
methods.ToSql trait has been redesigned. It can now be implemented without
unsafe, and implementors can choose to return either borrowed or owned results.query_row, query_row_and_then, query_row_safe,
and query_row_named now expects a &Row instead of a Row. The vast majority of calls
to these functions will probably not need to change; see
https://github.com/jgallagher/rusqlite/pull/184.Error enum have sprouted additional information
(e.g., FromSqlConversionFailure now also includes the column index and the type returned
by SQLite).#[deprecated(since = "...", note = "...")] flags (new in Rust 1.9 for libraries) to
all deprecated APIs.query_row convenience function to Statement.bundled feature which will build SQLite from source instead of attempting to link
against a SQLite that already exists on the system.DatabaseBusy; see https://github.com/jgallagher/rusqlite/issues/186.BREAKING CHANGE: Rows no longer implements Iterator. It still has a next() method, but the lifetime of the returned Row is now tied to the lifetime of…
Rows no longer implements Iterator. It still has a next() method, but
the lifetime of the returned Row is now tied to the lifetime of the vending Rows object.
This behavior is more correct. Previously there were runtime checks to prevent misuse, but
other changes in this release to reset statements as soon as possible introduced yet another
hazard related to the lack of these lifetime connections. We were already recommending the
use of query_map and query_and_then over raw query; both of those still return handles
that implement Iterator.Transaction::savepoint() now returns a Savepoint instead of another
Transaction. Unlike Transaction, Savepoints can be rolled back while keeping the current
savepoint active.Connection or savepoints from a Transaction
now take &mut self instead of &self to correctly represent that transactions within a
connection are inherently nested. While a transaction is alive, the parent connection or
transaction is unusable, so Transaction now implements Deref<Target=Connection>, giving
access to Connection's methods via the Transaction itself.Transaction::set_commit and Transaction::set_rollback have been replaced
by Transaction::set_drop_behavior.Connection::prepare_cached. Connection now keeps an internal cache of any statements
prepared via this method. The size of this cache defaults to 16 (prepare_cached will always
work but may re-prepare statements if more are prepared than the cache holds), and can be
controlled via Connection::set_prepared_statement_cache_capacity.query_map_named and query_and_then_named to Statement.insert convenience method to Statement which returns the row ID of an inserted row.exists convenience method returning whether a query finds one or more rows.serde_json crate. Requires the serde_json feature.chrono crate. Requires the chrono feature.load_extension feature from libsqlite3-sys. load_extension is still available
on rusqlite itself.trace feature.clippy feature and addresses issues it found.column_count() method to Statement and Row.types::Value for dynamic column types.functions Cargo feature).RowIndex trait allowing columns to be fetched via index (as before) or name (new).ZeroBlob type under the blob module/feature exposing SQLite's zeroblob API.handle() method to Connection. Please file an issue if you actually use it.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
BREAKING CHANGE: SqliteError is now an enum instead of a struct. Previously, we were (ab)using the error code and message to send back both underlying…
SqliteError is now an enum instead of a struct. Previously, we were (ab)using
the error code and message to send back both underlying SQLite errors and errors that occurred
at the Rust level. Now those have been separated out; SQLite errors are returned as
SqliteFailure cases (which still include the error code but also include a Rust-friendlier
enum as well), and rusqlite-level errors are captured in other cases. Because of this change,
SqliteError no longer implements PartialEq.SqliteTransactionDeferred, SqliteTransactionImmediate, and
SqliteTransactionExclusive are no longer exported. Instead, use
TransactionBehavior::Deferred, TransactionBehavior::Immediate, and
TransactionBehavior::Exclusive.Sqlite prefix on many types:
SqliteConnection is now ConnectionSqliteError is now ErrorSqliteResult is now ResultSqliteStatement is now StatementSqliteRows is now RowsSqliteRow is now RowSqliteOpenFlags is now OpenFlagsSqliteTransaction is now Transaction.SqliteTransactionBehavior is now TransactionBehavior.SqliteLoadExtensionGuard is now LoadExtensionGuard.
The old, prefixed names are still exported but are deprecated...._named methods for executing queries using named placeholder parameters.backup feature that exposes SQLite's online backup API.blob feature that exposes SQLite's Incremental I/O for BLOB API.functions feature that allows user-defined scalar functions to be added to
open SqliteConnections.Adds trace feature that allows the use of SQLite's logging, tracing, and profiling hooks.
trace feature that allows the use of SQLite's logging, tracing, and profiling hooks.query_map and query_and_then:
'static requirement on the closure's output type.&SqliteRow instead of a SqliteRow.SQLITE3_LIB_DIR now takes precedence over pkg-config.pkg-config is not available, we will try to find libsqlite3 in /usr/lib.SqliteResults.libc dependency to 0.2, fixing builds on ARM for Rust 1.6 or newer.Adds Sized bound to FromSql trait as required by RFC 1214.
Sized bound to FromSql trait as required by RFC 1214.One column per quarter.