ORM-02: Enable bundled SQLite #2

Closed
opened 2026-10-13 12:49:38 +01:00 by NoctisWolfshadow · 0 comments
Owner

Depends on: none

Context

Cargo.toml uses rusqlite without the bundled feature, so the crate links whatever SQLite the machine happens to have. Migrations rely on specific SQLite behaviour (transactional DDL, DROP COLUMN from 3.35, and the existing RIGHT JOIN needs 3.39), so the version has to be pinned by the build.

Tasks

  • Enable the bundled feature on rusqlite.
  • Crate docs list the SQLite features relied on: transactional DDL, DROP COLUMN (3.35+), RIGHT JOIN (3.39+).
  • Note in the README that the first build compiles C and needs a C compiler.
  • Add a test that fails if the linked SQLite is older than 3.39.

Example

[dependencies]
rusqlite = { version = "0.40.2", features = ["bundled"] }
// tests/sqlite_version.rs
#[test]
fn bundled_sqlite_is_new_enough() {
    // 3.39.0 is reported as 3_039_000
    assert!(rusqlite::version_number() >= 3_039_000);
}

Acceptance criteria

  • The crate builds on a machine without a system libsqlite3.
  • The version test passes.
**Depends on:** none ## Context `Cargo.toml` uses `rusqlite` without the `bundled` feature, so the crate links whatever SQLite the machine happens to have. Migrations rely on specific SQLite behaviour (transactional DDL, `DROP COLUMN` from 3.35, and the existing `RIGHT JOIN` needs 3.39), so the version has to be pinned by the build. ## Tasks - [x] Enable the `bundled` feature on `rusqlite`. - [x] Crate docs list the SQLite features relied on: transactional DDL, `DROP COLUMN` (3.35+), `RIGHT JOIN` (3.39+). - [x] Note in the README that the first build compiles C and needs a C compiler. - [x] Add a test that fails if the linked SQLite is older than 3.39. ## Example ```toml [dependencies] rusqlite = { version = "0.40.2", features = ["bundled"] } ``` ```rust // tests/sqlite_version.rs #[test] fn bundled_sqlite_is_new_enough() { // 3.39.0 is reported as 3_039_000 assert!(rusqlite::version_number() >= 3_039_000); } ``` ## Acceptance criteria - [x] The crate builds on a machine without a system libsqlite3. - [x] The version test passes.
NoctisWolfshadow added reference refactor_to_v0.2.0 2026-10-16 14:48:01 +01:00
Sign in to join this conversation.
No description provided.