Skip to content

sqlx-sqlite: relax libsqlite3-sys constraint to allow 0.36.x#4161

Merged
abonander merged 1 commit intolaunchbadge:mainfrom
darioAnongba:build/relax-libsqlite3-sys
Feb 12, 2026
Merged

sqlx-sqlite: relax libsqlite3-sys constraint to allow 0.36.x#4161
abonander merged 1 commit intolaunchbadge:mainfrom
darioAnongba:build/relax-libsqlite3-sys

Conversation

@darioAnongba
Copy link
Copy Markdown
Contributor

Does your PR solve an issue?

Fixes #4160

Is this a breaking change?

No

@abonander abonander merged commit f5cdf33 into launchbadge:main Feb 12, 2026
146 checks passed
@darioAnongba darioAnongba deleted the build/relax-libsqlite3-sys branch February 13, 2026 12:43
kriswuollett added a commit to appbiotic/tp-launchbadge-sqlx that referenced this pull request Apr 18, 2026
…compat

SQLCipher builds with SQLITE_OMIT_LOAD_EXTENSION (and does not include
sqlite3_unlock_notify), so sqlx-sqlite's unconditional imports of
sqlite3_load_extension and sqlite3_unlock_notify fail to link against a
SQLCipher-backed libsqlite3. This fork adds two opt-in Cargo features on
sqlx-sqlite:

  - `load-extension` — gates SqliteLoadExtensionMode, the load-extension
    helper fn, and the per-connection extension-loading block. When the
    feature is off and a consumer has called
    SqliteConnectOptions::extension(), establish() returns
    Error::InvalidArgument rather than silently ignoring the registration.

  - `unlock-notify` — gates sqlx-sqlite's unlock_notify module and the
    SQLITE_LOCKED_SHAREDCACHE match arm in connection and statement step
    loops. Forwards to libsqlite3-sys/unlock_notify so the symbol is
    compiled in only when the feature is requested.

Also widens the libsqlite3-sys version bound from =0.30.1 to
>=0.30.1, <0.38 so the crate can coexist with rusqlite 0.39+ (which
requires libsqlite3-sys 0.37) in the same 'links = "sqlite3"' graph.

Carried in the appbiotic fork; the widen + gating pattern follows
launchbadge/sqlx PR launchbadge#4161 and is intended to be upstreamable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlx-sqlite: libsqlite3-sys pin prevents coexistence with rusqlite 0.38 ecosystems

2 participants