@@ -54,8 +54,9 @@ authors.workspace = true
5454repository.workspace = true
5555rust-version.workspace = true
5656
57+ # Note: written so that it may be copy-pasted to other crates
5758[package .metadata .docs .rs ]
58- features = [" all-databases " , " _unstable-all-types " , " _unstable-doc " , " sqlite-preupdate-hook " ]
59+ features = [" _unstable-docs " ]
5960rustdoc-args = [" --cfg" , " docsrs" ]
6061
6162[features ]
@@ -83,8 +84,13 @@ _unstable-all-types = [
8384 " bit-vec" ,
8485 " bstr"
8586]
87+
8688# Render documentation that wouldn't otherwise be shown (e.g. `sqlx_core::config`).
87- _unstable-doc = []
89+ _unstable-docs = [
90+ " all-databases" ,
91+ " _unstable-all-types" ,
92+ " sqlx-sqlite/_unstable-docs"
93+ ]
8894
8995# Base runtime features without TLS
9096runtime-async-std = [" _rt-async-std" , " sqlx-core/_rt-async-std" , " sqlx-macros?/_rt-async-std" ]
@@ -110,10 +116,32 @@ _sqlite = []
110116any = [" sqlx-core/any" , " sqlx-mysql?/any" , " sqlx-postgres?/any" , " sqlx-sqlite?/any" ]
111117postgres = [" sqlx-postgres" , " sqlx-macros?/postgres" ]
112118mysql = [" sqlx-mysql" , " sqlx-macros?/mysql" ]
113- sqlite = [" _sqlite" , " sqlx-sqlite/bundled" , " sqlx-macros?/sqlite" ]
119+ sqlite = [" sqlite-bundled" , " sqlite-deserialize" , " sqlite-load-extension" , " sqlite-unlock-notify" ]
120+
121+ # SQLite base features
122+ sqlite-bundled = [" _sqlite" , " sqlx-sqlite/bundled" , " sqlx-macros?/sqlite" ]
114123sqlite-unbundled = [" _sqlite" , " sqlx-sqlite/unbundled" , " sqlx-macros?/sqlite-unbundled" ]
124+
125+ # SQLite features using conditionally compiled APIs
126+ # Note: these assume `sqlite-bundled` or `sqlite-unbundled` is also enabled
127+ #
128+ # Enable `SqliteConnection::deserialize()` and `::serialize()`
129+ # Cannot be used with `-DSQLITE_OMIT_DESERIALIZE`; requires `-DSQLITE_ENABLE_DESERIALIZE` on SQLite < 3.36.0
130+ sqlite-deserialize = [" sqlx-sqlite/deserialize" ]
131+
132+ # Enable `SqliteConnectOptions::extension()` and `::extension_with_entrypoint()`.
133+ # Also required to use `drivers.sqlite.unsafe-load-extensions` from `sqlx.toml`.
134+ # Cannot be used with `-DSQLITE_OMIT_LOAD_EXTENSION`
135+ sqlite-load-extension = [" sqlx-sqlite/load-extension" , " sqlx-macros?/sqlite-load-extension" ]
136+
137+ # Enables `sqlite3_preupdate_hook`
138+ # Requires `-DSQLITE_ENABLE_PREUPDATE_HOOK` (set automatically with `sqlite-bundled`)
115139sqlite-preupdate-hook = [" sqlx-sqlite/preupdate-hook" ]
116140
141+ # Enable internal handling of `SQLITE_LOCKED_SHAREDCACHE`
142+ # Requires `-DSQLITE_ENABLE_UNLOCK_NOTIFY` (set automatically with `sqlite-bundled`)
143+ sqlite-unlock-notify = [" sqlx-sqlite/unlock-notify" ]
144+
117145# types
118146json = [" sqlx-core/json" , " sqlx-macros?/json" , " sqlx-mysql?/json" , " sqlx-postgres?/json" , " sqlx-sqlite?/json" ]
119147
@@ -211,8 +239,14 @@ cast_sign_loss = 'deny'
211239# See `clippy.toml`
212240disallowed_methods = ' deny'
213241
214- [lints .rust ]
215- unexpected_cfgs = { level = ' warn' , check-cfg = [' cfg(mariadb, values(any()))' ] }
242+
243+ [lints .rust .unexpected_cfgs ]
244+ level = ' warn'
245+ check-cfg = [
246+ ' cfg(mariadb, values(any()))' ,
247+ ' cfg(sqlite_ipaddr)' ,
248+ ' cfg(sqlite_test_sqlcipher)' ,
249+ ]
216250
217251#
218252# Any
0 commit comments