Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
SQLite database driver.
Note: libsqlite3-sys
Version
This driver uses the libsqlite3-sys
crate which links the native library for SQLite 3.
Only one version of libsqlite3-sys
may appear in the dependency tree of your project.
As of SQLx 0.9.0, the version of libsqlite3-sys
is now a range instead of any specific version.
See the Cargo.toml
of the sqlx-sqlite
crate for the current version range.
If you are using rusqlite
or any other crate that indirectly depends on libsqlite3-sys
,
this should allow Cargo to select a compatible version.
If Cargo fails to select a compatible version, this means the other crate is using
a libsqlite3-sys
version outside of this range.
We may increase the maximum version of the range at our discretion, in patch (SemVer-compatible) releases, to allow users to upgrade to newer versions as desired.
The minimum version of the range may be increased over time to drop very old or insecure versions of SQLite, but this will only occur in major (SemVer-incompatible) releases.
Note that this means a cargo update
may increase the libsqlite3-sys
version,
which could, in rare cases, break your build.
To prevent this, you can pin the libsqlite3-sys
version in your own dependencies:
[]
# for example, if 0.35.0 breaks the build
= "0.34"
Static Linking (Default)
The sqlite
feature enables the bundled
feature of libsqlite3-sys
,
which builds SQLite 3 from included source code and statically links it into the final binary.
This requires some C build tools to be installed on the system; see
the rusqlite
README for details.
This version of SQLite is generally much newer than system-installed versions of SQLite
(especially for LTS Linux distributions), and can be updated with a cargo update
,
so this is the recommended option for ease of use and keeping up-to-date.
Dynamic linking
To dynamically link to an existing SQLite library, the sqlite-unbundled
feature can be used
instead.
This allows updating SQLite independently of SQLx or using forked versions, but you must have
SQLite installed on the system or provide a path to the library at build time (see
the rusqlite
README for details).
Note that this may result in link errors if the SQLite version is too old, or has certain features disabled at compile-time.
SQLite version 3.20.0
(released August 2018) or newer is recommended.
Please check your SQLite version and the flags it was built with before opening
a GitHub issue because of errors in libsqlite3-sys
. Thank you.
Optional Features
The following features