Skip to content

Commit 4d227f7

Browse files
authored
Remove built-in HTTPFS extension and fix Windows CI (#353)
* Remove HTTPFS, try to re-enable Windows test * Fix vtab types * Re-generate bindgen
1 parent 983e02a commit 4d227f7

File tree

9 files changed

+8
-43
lines changed

9 files changed

+8
-43
lines changed

.github/workflows/rust.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
fail-fast: true
1515
matrix:
1616
include:
17+
- { target: x86_64-pc-windows-msvc, os: windows-latest, duckdb: libduckdb-windows-amd64.zip }
1718
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, duckdb: libduckdb-linux-amd64.zip }
1819
#- { target: x86_64-apple-darwin, os: macos-latest }
1920
#- {

crates/duckdb/Cargo.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ name = "duckdb"
2020
[features]
2121
default = []
2222
bundled = ["libduckdb-sys/bundled"]
23-
httpfs = ["libduckdb-sys/httpfs", "bundled"]
2423
json = ["libduckdb-sys/json", "bundled"]
2524
parquet = ["libduckdb-sys/parquet", "bundled"]
26-
openssl_vendored = ["libduckdb-sys/openssl_vendored", "bundled"]
27-
unstable_boringssl = ["libduckdb-sys/unstable_boringssl", "bundled"]
28-
openssl_bindgen = ["libduckdb-sys/openssl_bindgen", "bundled"]
2925
vtab = []
3026
vtab-loadable = ["vtab", "duckdb-loadable-macros"]
3127
vtab-excel = ["vtab", "calamine"]
3228
vtab-arrow = ["vtab", "num"]
3329
appender-arrow = ["vtab-arrow"]
3430
vtab-full = ["vtab-excel", "vtab-arrow", "appender-arrow"]
35-
extensions-full = ["httpfs", "json", "parquet", "vtab-full"]
31+
extensions-full = ["json", "parquet", "vtab-full"]
3632
buildtime_bindgen = ["libduckdb-sys/buildtime_bindgen"]
3733
modern-full = ["chrono", "serde_json", "url", "r2d2", "uuid", "polars"]
3834
polars = ["dep:polars"]

crates/duckdb/src/extension.rs

-11
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,4 @@ mod test {
3131
);
3232
Ok(())
3333
}
34-
35-
// https://duckdb.org/docs/extensions/httpfs
36-
#[test]
37-
fn test_extension_httpfs() -> Result<()> {
38-
let db = Connection::open_in_memory()?;
39-
assert_eq!(
40-
300f32,
41-
db.query_row::<f32, _, _>(r#"SELECT SUM(value) FROM read_parquet('https://github.com/duckdb/duckdb-rs/raw/main/crates/duckdb/examples/int32_decimal.parquet');"#, [], |r| r.get(0))?
42-
);
43-
Ok(())
44-
}
4534
}

crates/duckdb/src/vtab/function.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::{
1919
/// An interface to store and retrieve data during the function bind stage
2020
#[derive(Debug)]
2121
pub struct BindInfo {
22-
ptr: *mut c_void,
22+
ptr: duckdb_bind_info,
2323
}
2424

2525
impl BindInfo {
@@ -264,7 +264,7 @@ impl TableFunction {
264264
///
265265
/// # Arguments
266266
/// * `function`: The init function
267-
pub fn set_init(&self, init_func: Option<unsafe extern "C" fn(*mut c_void)>) -> &Self {
267+
pub fn set_init(&self, init_func: Option<unsafe extern "C" fn(duckdb_init_info)>) -> &Self {
268268
unsafe {
269269
duckdb_table_function_set_init(self.ptr, init_func);
270270
}
@@ -275,7 +275,7 @@ impl TableFunction {
275275
///
276276
/// # Arguments
277277
/// * `function`: The bind function
278-
pub fn set_bind(&self, bind_func: Option<unsafe extern "C" fn(*mut c_void)>) -> &Self {
278+
pub fn set_bind(&self, bind_func: Option<unsafe extern "C" fn(duckdb_bind_info)>) -> &Self {
279279
unsafe {
280280
duckdb_table_function_set_bind(self.ptr, bind_func);
281281
}

crates/libduckdb-sys/Cargo.toml

+1-8
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,16 @@ exclude = ["duckdb-sources"]
1919
default = ["vcpkg", "pkg-config"]
2020
bundled = ["cc"]
2121
buildtime_bindgen = ["bindgen", "pkg-config", "vcpkg"]
22-
23-
httpfs = ["bundled"]
2422
json = ["bundled"]
2523
parquet = ["bundled"]
26-
extensions-full = ["httpfs", "json", "parquet"]
27-
28-
openssl_vendored = ["bundled", "openssl-src"]
29-
openssl_bindgen = ["bundled", "bindgen", "pkg-config", "vcpkg"]
30-
unstable_boringssl = ["bundled"]
24+
extensions-full = ["json", "parquet"]
3125

3226
[dependencies]
3327

3428
[build-dependencies]
3529
autocfg = { workspace = true }
3630
bindgen = { workspace = true, features = ["runtime"], optional = true }
3731
flate2 = { workspace = true }
38-
openssl-src = { version = "300.3.0", optional = true, features = ["legacy"] }
3932
pkg-config = { workspace = true, optional = true }
4033
cc = { workspace = true, features = ["parallel"], optional = true }
4134
vcpkg = { workspace = true, optional = true }

crates/libduckdb-sys/build.rs

-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use std::{env, path::Path};
22

3-
#[cfg(feature = "httpfs")]
4-
mod openssl;
5-
63
/// Tells whether we're building for Windows. This is more suitable than a plain
74
/// `cfg!(windows)`, since the latter does not properly handle cross-compilation
85
///
@@ -137,17 +134,6 @@ mod build_bundled {
137134
println!("cargo:rerun-if-changed=duckdb.tar.gz");
138135

139136
cfg.include(lib_name);
140-
141-
// Note: dont move this, the link order is important and we need to make
142-
// sure we link openssl after duckdb
143-
#[cfg(feature = "httpfs")]
144-
{
145-
if let Ok((_, openssl_include_dir)) = super::openssl::get_openssl_v2() {
146-
cfg.include(openssl_include_dir);
147-
}
148-
add_extension(&mut cfg, &manifest, "httpfs", &mut cpp_files, &mut include_dirs);
149-
}
150-
151137
cfg.includes(include_dirs.iter().map(|dir| format!("{out_dir}/{lib_name}/{dir}")));
152138

153139
for f in cpp_files.into_iter().map(|file| format!("{out_dir}/{file}")) {

crates/libduckdb-sys/duckdb.tar.gz

-18.2 KB
Binary file not shown.

crates/libduckdb-sys/src/bindgen_bundled_version.rs

+1-1
Large diffs are not rendered by default.

crates/libduckdb-sys/update_sources.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# List of extensions' sources to grab. Technically, these sources will be compiled
1818
# but not included in the final build unless they're explicitly enabled.
19-
EXTENSIONS = ["parquet", "json", "httpfs"]
19+
EXTENSIONS = ["parquet", "json"]
2020

2121
# Clear the duckdb directory
2222
try:

0 commit comments

Comments
 (0)