Skip to content

test(ci): prove the Windows COFF bridge links a rusqlite program (BR-2) - #22

Merged
zackees merged 1 commit into
mainfrom
br2-windows-ci-proof
Aug 7, 2026
Merged

zackees merged 1 commit into
mainfrom
br2-windows-ci-proof

Conversation

@zackees

@zackees zackees commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Implements BR-2 of the bridge strategy (#17). Closes #21. Follows BR-1 (#20).

What

Turns the one-time local check of the Windows COFF bridge into a permanent CI gate.

  • New e2e fixture ci/e2e/sqlite-bridge/ — a two-crate (lib dbcore + bin app), 16-source-file project with 4 deps: rusqlite (bundled → compiles + links the SQLite C amalgamation, exercising C linking through the bridge), plus serde/serde_json/anyhow. The app opens an in-memory SQLite DB, seeds/queries rows, does a serde round-trip, prints linked SQLite <ver> and OK, exits 0. It's its own workspace, and added to the root [workspace].exclude, so root builds / clippy / cargo-deny never build it. Cargo.lock committed (deps pinned); target/ git-ignored.
  • One windows-msvc CI step — after the workspace build produces reld-link.exe, it sets CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER to that binary, builds the fixture, runs it, and asserts exit 0 + the OK/linked SQLite markers. A failed link or non-zero run fails the job. Other matrix legs unchanged.

Testing

  • Local e2e: built the fixture with the msvc linker pointed at a locally-built reld-link.exe → linked SQLite 3.46.0 / 3 widgets, 60 units total / OK, exit 0. Proves the bridge links a bundled-SQLite (C) binary that runs.
  • fmt --check clean; YAML parses; workspace isolation verified (root build does not descend into the fixture); no target//log artifacts staged.

Review

Independent review confirmed no false-green risk in the CI step ($LASTEXITCODE survives the Out-String/finally idiom — verified empirically), correct step placement/gating, sound workspace isolation, and traced all 16 fixture files. Its one blocking nit (missing fixture .gitignore for target/) is fixed in this PR.

🤖 Generated with Claude Code

Add a self-contained e2e fixture (ci/e2e/sqlite-bridge): a two-crate,
16-file project with 4 deps including rusqlite `bundled`, which compiles and
links the SQLite C amalgamation — exercising C linking through the bridge.
It is its own workspace and excluded from the root workspace so root builds,
clippy, and cargo-deny never descend into it.

Add one windows-msvc CI step that, after the workspace build produces
reld-link.exe, points cargo's msvc linker at it
(CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER), builds the fixture, runs it, and
asserts exit 0 plus the OK / "linked SQLite" markers. A failed link or a
non-zero run fails the job. Other matrix legs are untouched.

Closes #21

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BR-2: Windows CI proof — link a rusqlite program with reld on the windows-msvc runner

1 participant