better_duck_sys/lib.rs
1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! Vendored DuckDB C API bindings for the `better-duck` workspace.
3//!
4//! This crate replaces the external `libduckdb-sys` dependency: DuckDB's C++
5//! source is vendored directly in this crate (`vendor/duckdb.tar.gz`,
6//! compiled from source by `build.rs` on every build — there is no toggle for
7//! this, unlike upstream's `bundled` feature, since this crate exists
8//! specifically to own that source), and the FFI `bindings`
9//! are pregenerated and checked in rather than produced by
10//! `bindgen` at consumer build time. See `xtask/src/main.rs` (workspace
11//! root) for the maintainer-only regeneration process.
12#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
13#![allow(missing_docs, clippy::missing_safety_doc, clippy::undocumented_unsafe_blocks)]
14
15mod bindings;
16mod error;
17
18pub use bindings::*;
19pub use error::{DuckDBError, DuckDBSuccess, Error};
20
21/// The upstream DuckDB release tag this crate's vendored source and bindings
22/// were generated from (e.g. `"v1.5.5"`), set by `build.rs` from the vendored
23/// archive's own `manifest.json`.
24pub const DUCKDB_VENDORED_VERSION: &str = env!("DUCKDB_VENDORED_VERSION");