Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI

on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
Expand Down Expand Up @@ -39,6 +40,9 @@ jobs:
- name: Build
run: cargo build --all-features

- name: Test bindgen runtime feature unification
run: cargo check --manifest-path tests/bindgen-runtime/Cargo.toml

- name: Test
run: cargo nextest run --all-features

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tempfile = "3"
libc = "0.2"

[build-dependencies]
bindgen = { version = "0.72", default-features = false }
bindgen = { version = "0.72", default-features = false, features = ["runtime"] }

[features]
default = ["static"]
Expand Down
12 changes: 12 additions & 0 deletions tests/bindgen-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "sqlite-plugin-bindgen-runtime-test"
version = "0.0.0"
edition = "2024"
publish = false

[dependencies]
sqlite-plugin = { path = "../.." }

[build-dependencies]
# A distinct Builder version reproduces downstream feature unification.
bindgen = { version = "=0.71.1", default-features = false, features = ["runtime"] }
10 changes: 10 additions & 0 deletions tests/bindgen-runtime/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fn main() {
bindgen::Builder::default()
.header_contents("runtime.h", "typedef unsigned int RuntimeTest;")
.generate()
.expect("the second bindgen version must load libclang")
.write_to_file(
std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap()).join("runtime.rs"),
)
.expect("write the generated runtime test type");
}
3 changes: 3 additions & 0 deletions tests/bindgen-runtime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include!(concat!(env!("OUT_DIR"), "/runtime.rs"));

pub use sqlite_plugin::*;