@@ -54,8 +54,9 @@ authors.workspace = true
54
54
repository.workspace = true
55
55
rust-version.workspace = true
56
56
57
+ # Note: written so that it may be copy-pasted to other crates
57
58
[package .metadata .docs .rs ]
58
- features = [" all-databases " , " _unstable-all-types " , " _unstable-doc " , " sqlite-preupdate-hook " ]
59
+ features = [" _unstable-docs " ]
59
60
rustdoc-args = [" --cfg" , " docsrs" ]
60
61
61
62
[features ]
@@ -83,8 +84,13 @@ _unstable-all-types = [
83
84
" bit-vec" ,
84
85
" bstr"
85
86
]
87
+
86
88
# 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
+ ]
88
94
89
95
# Base runtime features without TLS
90
96
runtime-async-std = [" _rt-async-std" , " sqlx-core/_rt-async-std" , " sqlx-macros?/_rt-async-std" ]
@@ -110,10 +116,32 @@ _sqlite = []
110
116
any = [" sqlx-core/any" , " sqlx-mysql?/any" , " sqlx-postgres?/any" , " sqlx-sqlite?/any" ]
111
117
postgres = [" sqlx-postgres" , " sqlx-macros?/postgres" ]
112
118
mysql = [" 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" ]
114
123
sqlite-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`)
115
139
sqlite-preupdate-hook = [" sqlx-sqlite/preupdate-hook" ]
116
140
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
+
117
145
# types
118
146
json = [" sqlx-core/json" , " sqlx-macros?/json" , " sqlx-mysql?/json" , " sqlx-postgres?/json" , " sqlx-sqlite?/json" ]
119
147
@@ -211,8 +239,14 @@ cast_sign_loss = 'deny'
211
239
# See `clippy.toml`
212
240
disallowed_methods = ' deny'
213
241
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
+ ]
216
250
217
251
#
218
252
# Any
0 commit comments