From 387c186125b7bcd800f95fdf6f02d6a7dff4b81e Mon Sep 17 00:00:00 2001
From: Mark Hammond <mhammond@skippinet.com.au>
Date: Fri, 24 Nov 2023 17:03:13 -0500
Subject: [PATCH 1/2] WIP - expect failures

---
 Cargo.lock                                          |  6 ++++--
 automation/emit_coverage_info.sh                    |  2 +-
 automation/tests.py                                 |  6 +++---
 components/as-ohttp-client/Cargo.toml               |  5 ++++-
 components/autofill/Cargo.toml                      |  7 ++-----
 components/logins/Cargo.toml                        |  6 ++----
 components/places/Cargo.toml                        |  6 ++----
 components/push/Cargo.toml                          |  3 ++-
 components/suggest/Cargo.toml                       |  3 ++-
 components/support/guid/Cargo.toml                  |  3 ++-
 components/support/interrupt/Cargo.toml             |  6 +++---
 components/support/rc_crypto/Cargo.toml             |  2 --
 components/support/rc_crypto/nss/nss_sys/src/lib.rs |  7 +++++--
 components/support/sql/Cargo.toml                   |  6 ++----
 components/support/types/Cargo.toml                 |  6 +++---
 components/sync15/Cargo.toml                        |  3 +++
 components/tabs/Cargo.toml                          |  3 ++-
 components/webext-storage/Cargo.toml                | 12 +++---------
 components/webext-storage/build.rs                  | 13 -------------
 components/webext-storage/ffi/Cargo.toml            |  3 +++
 examples/autofill-utils/Cargo.toml                  |  2 +-
 examples/places-autocomplete/Cargo.toml             |  5 +----
 examples/sync-pass/Cargo.toml                       |  5 +----
 megazords/full/Cargo.toml                           |  2 ++
 megazords/ios-rust/Cargo.toml                       |  3 +++
 testing/separated/places-tests/Cargo.toml           |  5 +----
 26 files changed, 57 insertions(+), 73 deletions(-)
 delete mode 100644 components/webext-storage/build.rs

diff --git a/Cargo.lock b/Cargo.lock
index 17a6a7b70f..b4fe3e5595 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -240,7 +240,6 @@ dependencies = [
  "interrupt-support",
  "jwcrypto",
  "lazy_static",
- "libsqlite3-sys",
  "log",
  "nss_build_common",
  "rusqlite",
@@ -2265,6 +2264,7 @@ dependencies = [
  "push",
  "rc_log_ffi",
  "remote_settings",
+ "rusqlite",
  "rust-log-forwarder",
  "suggest",
  "sync_manager",
@@ -2300,6 +2300,7 @@ dependencies = [
  "push",
  "rc_log_ffi",
  "remote_settings",
+ "rusqlite",
  "rust-log-forwarder",
  "suggest",
  "sync15",
@@ -4022,6 +4023,7 @@ dependencies = [
  "lazy_static",
  "log",
  "rc_crypto",
+ "rusqlite",
  "serde",
  "serde_derive",
  "serde_json",
@@ -4913,7 +4915,6 @@ dependencies = [
  "ffi-support",
  "interrupt-support",
  "lazy_static",
- "libsqlite3-sys",
  "log",
  "nss_build_common",
  "parking_lot",
@@ -4936,6 +4937,7 @@ dependencies = [
  "ffi-support",
  "lazy_static",
  "log",
+ "rusqlite",
  "serde_json",
  "webext-storage",
 ]
diff --git a/automation/emit_coverage_info.sh b/automation/emit_coverage_info.sh
index b731cfbb29..d424a33da1 100755
--- a/automation/emit_coverage_info.sh
+++ b/automation/emit_coverage_info.sh
@@ -54,4 +54,4 @@ cargo +nightly run -p sync-test || true
 cargo +nightly run -p protobuf-gen -- tools/protobuf_files.toml || true
 cargo +nightly run -p systest || true
 
-env RUSTFLAGS="--cfg __appsvc_ci_hack $RUSTFLAGS" cargo +nightly test --all --all-features --no-fail-fast || true
+env RUSTFLAGS="--cfg __appsvc_ci_sqlite_hack $RUSTFLAGS" cargo +nightly test --all --all-features --no-fail-fast || true
diff --git a/automation/tests.py b/automation/tests.py
index 5246ec3032..54422d9c4c 100755
--- a/automation/tests.py
+++ b/automation/tests.py
@@ -277,11 +277,11 @@ def print_rust_environment():
 
 def calc_rust_env(package, features):
     if features == RustFeatures.ALL:
-        # nss-sys's --features handling is broken.  Workaround it by using a
-        # custom --cfg.  This shouldn't be this way!
+        # Anything needing special support for sqlite might fail to link it.
+        # `--all-features` in CI hits this - it shouldn't be this way!
         return {
             **os.environ,
-            'RUSTFLAGS' : "--cfg __appsvc_ci_hack"
+            'RUSTFLAGS' : "--cfg __appsvc_ci_sqlite_hack"
         }
     else:
         return None
diff --git a/components/as-ohttp-client/Cargo.toml b/components/as-ohttp-client/Cargo.toml
index 8189f5fbca..f2457330d6 100644
--- a/components/as-ohttp-client/Cargo.toml
+++ b/components/as-ohttp-client/Cargo.toml
@@ -14,7 +14,7 @@ uniffi = "0.24.1"
 thiserror = "1.0"
 bhttp = "0.3"
 parking_lot = "0.12"
-rusqlite = { version = "0.29.0", features = ["bundled"] }
+rusqlite = "0.29.0"
 
 [dependencies.ohttp]
 version = "0.4"
@@ -23,5 +23,8 @@ git = "https://github.com/martinthomson/ohttp.git"
 rev = "fc3f4c787d1f6a6a87bf5194f7152cc906b02973"
 features = ["client", "server", "app-svc", "external-sqlite"]
 
+[dev-dependencies]
+rusqlite = { version = "0.29.0", features = ["bundled"] }
+
 [build-dependencies]
 uniffi = { version = "0.24.1", features=["build"]}
diff --git a/components/autofill/Cargo.toml b/components/autofill/Cargo.toml
index 5ce3728417..7f2c938faa 100644
--- a/components/autofill/Cargo.toml
+++ b/components/autofill/Cargo.toml
@@ -25,14 +25,11 @@ thiserror = "1.0"
 types = { path = "../support/types" }
 uniffi = "0.24.1"
 url = { version = "2.2", features = ["serde"] }
-
-[dependencies.rusqlite]
-version = "0.29.0"
-features = ["functions", "bundled", "serde_json", "unlock_notify"]
+rusqlite = { version = "0.29.0", features = ["functions"] }
 
 [dev-dependencies]
 env_logger = { version = "0.7", default-features = false }
-libsqlite3-sys = "0.26.0"
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 
 [build-dependencies]
 nss_build_common = { path = "../support/rc_crypto/nss/nss_build_common" }
diff --git a/components/logins/Cargo.toml b/components/logins/Cargo.toml
index 8c8f258588..ceb2f7ae50 100644
--- a/components/logins/Cargo.toml
+++ b/components/logins/Cargo.toml
@@ -28,13 +28,11 @@ sync-guid = { path = "../support/guid", features = ["rusqlite_support", "random"
 thiserror = "1.0"
 anyhow = "1.0"
 uniffi = "0.24.1"
-
-[dependencies.rusqlite]
-version = "0.29.0"
-features = ["limits", "unlock_notify"]
+rusqlite = "0.29.0"
 
 [build-dependencies]
 uniffi = { version = "0.24.1", features = ["build"] }
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 
 [dev-dependencies]
 more-asserts = "0.2"
diff --git a/components/places/Cargo.toml b/components/places/Cargo.toml
index 3775d68cf7..053b76041b 100644
--- a/components/places/Cargo.toml
+++ b/components/places/Cargo.toml
@@ -34,15 +34,13 @@ sync-guid = { path = "../support/guid", features = ["rusqlite_support", "random"
 thiserror = "1.0"
 anyhow = "1.0"
 uniffi = "0.24.1"
-
-[dependencies.rusqlite]
-version = "0.29.0"
-features = ["functions", "window", "bundled", "unlock_notify"]
+rusqlite = { version = "0.29.0", features = ["functions", "window"] }
 
 [dev-dependencies]
 pretty_assertions = "0.6"
 tempfile = "3.1"
 env_logger = {version = "0.7", default-features = false}
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 sql-support = { path = "../support/sql" }
 
 [build-dependencies]
diff --git a/components/push/Cargo.toml b/components/push/Cargo.toml
index 7809f1c583..bdb80844c3 100644
--- a/components/push/Cargo.toml
+++ b/components/push/Cargo.toml
@@ -13,7 +13,7 @@ bincode = "1.2"
 lazy_static = "1.4"
 base64 = "0.21"
 log = "0.4"
-rusqlite = { version = "0.29.0", features = ["bundled", "unlock_notify"] }
+rusqlite = "0.29.0"
 url = "2.2"
 viaduct = { path = "../viaduct" }
 error-support = { path = "../support/error" }
@@ -24,6 +24,7 @@ uniffi = "0.24.1"
 types = { path = "../support/types" }
 
 [build-dependencies]
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 uniffi = { version = "0.24.1", features = ["build"] }
 
 [dev-dependencies]
diff --git a/components/suggest/Cargo.toml b/components/suggest/Cargo.toml
index f2ffd28f3b..4d1d11b688 100644
--- a/components/suggest/Cargo.toml
+++ b/components/suggest/Cargo.toml
@@ -14,7 +14,7 @@ interrupt-support = { path = "../support/interrupt" }
 once_cell = "1.5"
 parking_lot = ">=0.11,<=0.12"
 remote_settings = { path = "../remote_settings" }
-rusqlite = { version = "0.29.0", features = ["functions", "bundled"] }
+rusqlite = { version = "0.29.0", features = ["functions"] }
 serde = { version = "1", features = ["derive"] }
 serde_json = "1"
 sql-support = { path = "../support/sql" }
@@ -26,6 +26,7 @@ env_logger = { version = "0.7", default-features = false }
 expect-test = "1.4"
 hex = "0.4"
 rc_crypto = { path = "../support/rc_crypto" }
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 
 [build-dependencies]
 uniffi = { version = "0.24.1", features = ["build"] }
diff --git a/components/support/guid/Cargo.toml b/components/support/guid/Cargo.toml
index 1b9ab62658..0239105545 100644
--- a/components/support/guid/Cargo.toml
+++ b/components/support/guid/Cargo.toml
@@ -6,7 +6,7 @@ license = "MPL-2.0"
 edition = "2021"
 
 [dependencies]
-rusqlite = { version = "0.29.0", optional = true, features = ["bundled"] }
+rusqlite = { version = "0.29.0", optional = true }
 serde = { version = "1", optional = true }
 rand = { version = "0.8", optional = true }
 base64 = { version = "0.21", optional = true }
@@ -20,3 +20,4 @@ default = ["serde_support"]
 
 [dev-dependencies]
 serde_test = "1"
+rusqlite = { version = "0.29.0", features = ["bundled"] }
diff --git a/components/support/interrupt/Cargo.toml b/components/support/interrupt/Cargo.toml
index edb91c2957..3c4382b582 100644
--- a/components/support/interrupt/Cargo.toml
+++ b/components/support/interrupt/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2021"
 [dependencies]
 lazy_static = "1.4"
 parking_lot = ">=0.11,<=0.12"
+rusqlite = { version = "0.29.0", features = ["functions"] }
 
-[dependencies.rusqlite]
-version = "0.29.0"
-features = ["functions", "limits", "bundled", "unlock_notify"]
+[dev-dependencies]
+rusqlite = { version = "0.29.0", features = ["bundled"] }
diff --git a/components/support/rc_crypto/Cargo.toml b/components/support/rc_crypto/Cargo.toml
index 66517e4647..c5a9e19178 100644
--- a/components/support/rc_crypto/Cargo.toml
+++ b/components/support/rc_crypto/Cargo.toml
@@ -17,8 +17,6 @@ nss = { path = "nss" }
 hawk = { version = "3.2", default-features = false, optional = true }
 ece = { version = "2.1", default-features = false, features = ["serializable-keys"], optional = true }
 
-[dev-dependencies]
-
 [dev-dependencies.ece]
 version = "2.0"
 default-features = false
diff --git a/components/support/rc_crypto/nss/nss_sys/src/lib.rs b/components/support/rc_crypto/nss/nss_sys/src/lib.rs
index 261d67bbbc..4118e2a6ed 100644
--- a/components/support/rc_crypto/nss/nss_sys/src/lib.rs
+++ b/components/support/rc_crypto/nss/nss_sys/src/lib.rs
@@ -9,8 +9,11 @@
 mod bindings;
 pub use bindings::*;
 
-// So we link against the SQLite lib imported by parent crates
+// We need a sqlite - so we link against the SQLite lib imported by parent crates
 // such as places and logins.
+// But the "gecko" feature is confusingly different - we rely on an external linker
+// to put the bits together. `__appsvc_ci_sqlite_hack`` works around `--all-features`
+// errors in CI, where linker-related build failures are unavoidable.
 #[allow(unused_extern_crates)]
-#[cfg(any(not(feature = "gecko"), __appsvc_ci_hack))]
+#[cfg(any(not(feature = "gecko"), __appsvc_ci_sqlite_hack))]
 extern crate libsqlite3_sys;
diff --git a/components/support/sql/Cargo.toml b/components/support/sql/Cargo.toml
index 8d75c1f333..fb3680268b 100644
--- a/components/support/sql/Cargo.toml
+++ b/components/support/sql/Cargo.toml
@@ -18,13 +18,11 @@ ffi-support = "0.4"
 thiserror = "1.0"
 tempfile = "3.1.0"
 prettytable-rs = { version = "0.10", optional = true }
-
-[dependencies.rusqlite]
-version = "0.29.0"
-features = ["functions", "limits", "bundled", "unlock_notify"]
+rusqlite = { version = "0.29.0", features = ["functions", "limits"] }
 
 [dev-dependencies]
 env_logger = {version = "0.7", default-features = false}
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 
 [build-dependencies]
 nss_build_common = { path = "../rc_crypto/nss/nss_build_common" }
diff --git a/components/support/types/Cargo.toml b/components/support/types/Cargo.toml
index cde6dd4d33..b6ab059ea0 100644
--- a/components/support/types/Cargo.toml
+++ b/components/support/types/Cargo.toml
@@ -10,7 +10,7 @@ edition = "2021"
 serde = "1"
 serde_derive = "1"
 serde_json = "1"
+rusqlite = "0.29.0"
 
-[dependencies.rusqlite]
-version = "0.29.0"
-features = ["functions", "bundled"]
+[dev-dependencies]
+rusqlite = { version = "0.29.0", features = ["bundled"] }
diff --git a/components/sync15/Cargo.toml b/components/sync15/Cargo.toml
index fce749249d..3ee01639d4 100644
--- a/components/sync15/Cargo.toml
+++ b/components/sync15/Cargo.toml
@@ -66,6 +66,9 @@ viaduct = { path = "../viaduct", optional = true }
 
 [dev-dependencies]
 env_logger = { version = "0.7", default-features = false }
+# rc_cryto needs nss, which needs sqlite...
+rusqlite = { version = "0.29.0", features = ["bundled"] }
+
 
 [build-dependencies]
 uniffi = { version = "0.24.1", features = ["build"] }
diff --git a/components/tabs/Cargo.toml b/components/tabs/Cargo.toml
index 559f5f7285..21a1d92b4c 100644
--- a/components/tabs/Cargo.toml
+++ b/components/tabs/Cargo.toml
@@ -12,7 +12,7 @@ error-support = { path = "../support/error" }
 interrupt-support = { path = "../support/interrupt" }
 lazy_static = "1.4"
 log = "0.4"
-rusqlite = { version = "0.29.0", features = ["bundled", "unlock_notify"] }
+rusqlite = "0.29.0"
 serde = "1"
 serde_derive = "1"
 serde_json = "1"
@@ -25,6 +25,7 @@ url = "2.1" # mozilla-central can't yet take 2.2 (see bug 1734538)
 
 [dev-dependencies]
 env_logger = { version = "0.8.0", default-features = false, features = ["termcolor", "atty", "humantime"] }
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 tempfile = "3.1"
 
 [build-dependencies]
diff --git a/components/webext-storage/Cargo.toml b/components/webext-storage/Cargo.toml
index 16fab45fdf..b64c448a04 100644
--- a/components/webext-storage/Cargo.toml
+++ b/components/webext-storage/Cargo.toml
@@ -24,19 +24,13 @@ sql-support = { path = "../support/sql" }
 sync15 = {path = "../../components/sync15", features=["sync-engine"]}
 sync-guid = { path = "../support/guid", features = ["rusqlite_support", "random"] }
 url = { version = "2.1", features = ["serde"] }
-
-[dependencies.rusqlite]
-version = "0.29.0"
-features = ["functions", "bundled", "serde_json", "unlock_notify"]
+rusqlite = { version = "0.29.0",features = ["functions", "serde_json"] }
 
 [dev-dependencies]
 env_logger = { version = "0.7", default-features = false }
-tempfile = "3"
-# A *direct* dep on the -sys crate is required for our build.rs
-# to see the DEP_SQLITE3_LINK_TARGET env var that cargo sets
-# on its behalf.
-libsqlite3-sys = "0.26.0"
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 sql-support = { path = "../support/sql" }
+tempfile = "3"
 
 [build-dependencies]
 nss_build_common = { path = "../support/rc_crypto/nss/nss_build_common" }
diff --git a/components/webext-storage/build.rs b/components/webext-storage/build.rs
deleted file mode 100644
index 59a845e5d3..0000000000
--- a/components/webext-storage/build.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-//! Work around the fact that `sqlcipher` might get enabled by a cargo feature
-//! another crate in the workspace needs, without setting up nss.  (This is a
-//! gross hack).
-fn main() {
-    println!("cargo:rerun-if-changed=build.rs");
-
-    // If NSS_DIR isn't set, we don't really care, ignore the Err case.
-    let _ = nss_build_common::link_nss();
-}
diff --git a/components/webext-storage/ffi/Cargo.toml b/components/webext-storage/ffi/Cargo.toml
index ecd74aa32e..7224eda560 100644
--- a/components/webext-storage/ffi/Cargo.toml
+++ b/components/webext-storage/ffi/Cargo.toml
@@ -17,3 +17,6 @@ serde_json = "1"
 
 [dependencies.webext-storage]
 path = ".."
+
+[dev-dependencies]
+rusqlite = { version = "0.29.0", features = ["bundled"] }
diff --git a/examples/autofill-utils/Cargo.toml b/examples/autofill-utils/Cargo.toml
index be15a5e43d..d553aadc8b 100644
--- a/examples/autofill-utils/Cargo.toml
+++ b/examples/autofill-utils/Cargo.toml
@@ -18,7 +18,7 @@ fxa-client = { path = "../../components/fxa-client" }
 error-support = { path = "../../components/support/error" }
 interrupt-support = { path = "../../components/support/interrupt" } # XXX - should be removed once we do interrupts correctly!
 log = "0.4"
-rusqlite = {version = "0.29.0", features = ["functions", "bundled", "serde_json", "unlock_notify"]}
+rusqlite = {version = "0.29.0", features = ["bundled"]}
 serde_json = "1"
 sql-support = { path = "../../components/support/sql" }
 structopt = "0.3"
diff --git a/examples/places-autocomplete/Cargo.toml b/examples/places-autocomplete/Cargo.toml
index ef1763143e..23c806db18 100644
--- a/examples/places-autocomplete/Cargo.toml
+++ b/examples/places-autocomplete/Cargo.toml
@@ -22,10 +22,7 @@ clap = "2.33"
 tempfile = "3.1"
 rand = "0.8"
 find-places-db = "0.2"
-
-[dev-dependencies.rusqlite]
-version = "0.29.0"
-features = ["functions", "bundled"]
+rusqlite = { version = "0.29.0", features = ["bundled"] }
 
 # While we don't have a replacement for termion on Windows yet (and thus
 # our example doesn't work on Windows), it does get further in the compilation
diff --git a/examples/sync-pass/Cargo.toml b/examples/sync-pass/Cargo.toml
index 4203c2e708..d1fc41a6ec 100644
--- a/examples/sync-pass/Cargo.toml
+++ b/examples/sync-pass/Cargo.toml
@@ -27,7 +27,4 @@ tempfile = "3"
 serde_json = "1.0"
 url = "2.2"
 viaduct-reqwest = { path = "../../components/support/viaduct-reqwest" }
-
-[dev-dependencies.rusqlite]
-version = "0.29.0"
-features = ["limits"]
+rusqlite = { version = "0.29.0", features = ["bundled"] }
diff --git a/megazords/full/Cargo.toml b/megazords/full/Cargo.toml
index e4d8fba01a..7c133088a8 100644
--- a/megazords/full/Cargo.toml
+++ b/megazords/full/Cargo.toml
@@ -24,5 +24,7 @@ autofill = { path = "../../components/autofill" }
 crashtest = { path = "../../components/crashtest" }
 error-support = { path = "../../components/support/error" }
 suggest = { path = "../../components/suggest" }
+# Force the "bundled" feature????
+rusqlite = { version = "0.29.0" }
 
 lazy_static = "1.4"
diff --git a/megazords/ios-rust/Cargo.toml b/megazords/ios-rust/Cargo.toml
index 4bee6406c4..bf9334e990 100644
--- a/megazords/ios-rust/Cargo.toml
+++ b/megazords/ios-rust/Cargo.toml
@@ -27,3 +27,6 @@ sync15 = {path = "../../components/sync15"}
 error-support = { path = "../../components/support/error" }
 sync_manager = { path = "../../components/sync_manager" }
 as-ohttp-client = { path = "../../components/as-ohttp-client" }
+
+# Force the "bundled" feature????
+rusqlite = { version = "0.29.0" }
diff --git a/testing/separated/places-tests/Cargo.toml b/testing/separated/places-tests/Cargo.toml
index c45675316e..d038caa5f1 100644
--- a/testing/separated/places-tests/Cargo.toml
+++ b/testing/separated/places-tests/Cargo.toml
@@ -21,7 +21,4 @@ url = "2.2"
 dogear = "0.4"
 tempfile = "3.1"
 env_logger = { version = "0.7", default-features = false }
-
-[dev-dependencies.rusqlite]
-version = "0.29.0"
-features = ["functions", "bundled"]
+rusqlite = { version = "0.29.0", features = ["bundled"] }

From ff0213105597d95e0944caa958f1456a94b46a90 Mon Sep 17 00:00:00 2001
From: Mark Hammond <mhammond@skippinet.com.au>
Date: Mon, 27 Nov 2023 17:24:58 -0500
Subject: [PATCH 2/2] megazords

---
 Cargo.lock                    | 1 -
 automation/tests.py           | 3 ++-
 megazords/full/Cargo.toml     | 8 ++++++--
 megazords/ios-rust/Cargo.toml | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index b4fe3e5595..a145daaefd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2264,7 +2264,6 @@ dependencies = [
  "push",
  "rc_log_ffi",
  "remote_settings",
- "rusqlite",
  "rust-log-forwarder",
  "suggest",
  "sync_manager",
diff --git a/automation/tests.py b/automation/tests.py
index 54422d9c4c..57e03aa7f5 100755
--- a/automation/tests.py
+++ b/automation/tests.py
@@ -278,7 +278,8 @@ def print_rust_environment():
 def calc_rust_env(package, features):
     if features == RustFeatures.ALL:
         # Anything needing special support for sqlite might fail to link it.
-        # `--all-features` in CI hits this - it shouldn't be this way!
+        # `--all-features` in CI (notably nss-sys via rc_crypto) hits this.
+        # This shouldn't be this way!
         return {
             **os.environ,
             'RUSTFLAGS' : "--cfg __appsvc_ci_sqlite_hack"
diff --git a/megazords/full/Cargo.toml b/megazords/full/Cargo.toml
index 7c133088a8..26ebc14c5f 100644
--- a/megazords/full/Cargo.toml
+++ b/megazords/full/Cargo.toml
@@ -24,7 +24,11 @@ autofill = { path = "../../components/autofill" }
 crashtest = { path = "../../components/crashtest" }
 error-support = { path = "../../components/support/error" }
 suggest = { path = "../../components/suggest" }
-# Force the "bundled" feature????
-rusqlite = { version = "0.29.0" }
+
+# This is a bit of a mess. It appears we get rusqlite=bundled as a side-effect of
+# none of the rc_crypto consumers *not* using the `gecko` feature in that crate.
+# If we wanted to *avoid* the bundled sqlite here we'd need to use the `in_gecko` feature of rusqlite.
+# In an ideal world, it seems we should be required to use `features=["bundled]` for rusqlite here.
+# (But for now we want to ship our sqlite for Android, so don't need to do anything here currently)
 
 lazy_static = "1.4"
diff --git a/megazords/ios-rust/Cargo.toml b/megazords/ios-rust/Cargo.toml
index bf9334e990..8f8b2f1140 100644
--- a/megazords/ios-rust/Cargo.toml
+++ b/megazords/ios-rust/Cargo.toml
@@ -28,5 +28,5 @@ error-support = { path = "../../components/support/error" }
 sync_manager = { path = "../../components/sync_manager" }
 as-ohttp-client = { path = "../../components/as-ohttp-client" }
 
-# Force the "bundled" feature????
-rusqlite = { version = "0.29.0" }
+# For iOS we *do not* want to ship sqlite.
+rusqlite = { version = "0.29.0", features=["in_gecko"] }