Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C API header generation for Go bindings #14944

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

taniabogatsch
Copy link
Contributor

@taniabogatsch taniabogatsch commented Nov 22, 2024

This PR extends the C API generation script with Go API header generation capacities.
The idea is to (eventually) support a lightweight Go package wrapping the C API bindings in Go types/functions/etc.

Now, the script generates the following list of files.

# The main C header. This is what to include when linking with DuckDB through the C API.
 DUCKDB_HEADER_OUT_FILE_NAME = 'duckdb.h'
 DUCKDB_HEADER_OUT_FILE = 'src/include/' + DUCKDB_HEADER_OUT_FILE_NAME
 # The main C header excluding all functions.
 DUCKDB_HEADER_BASE_OUT_FILE_NAME = 'duckdb_base.h'
 DUCKDB_HEADER_BASE_OUT_FILE = 'src/include/' + DUCKDB_HEADER_BASE_OUT_FILE_NAME
 # The header to be included by DuckDB C extensions.
 DUCKDB_HEADER_C_OUT_FILE = 'src/include/duckdb_extension.h'
 # The header to be included by DuckDB Go extensions.
 DUCKDB_HEADER_GO_OUT_FILE = 'src/include/duckdb_go_extension.h'
 # An internal header for DuckDB C extensions.
 DUCKDB_HEADER_EXT_INTERNAL_OUT_FILE = 'src/include/duckdb/main/capi/extension_api.hpp'

src/include/duckdb_base.h Outdated Show resolved Hide resolved
src/include/duckdb_go_extension.h Outdated Show resolved Hide resolved
@taniabogatsch taniabogatsch marked this pull request as ready for review November 22, 2024 14:12
@duckdb-draftbot duckdb-draftbot marked this pull request as draft November 22, 2024 14:13
@taniabogatsch taniabogatsch marked this pull request as ready for review November 22, 2024 14:16
@duckdb-draftbot duckdb-draftbot marked this pull request as draft November 26, 2024 16:10
@taniabogatsch taniabogatsch marked this pull request as ready for review November 26, 2024 16:10
@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 23, 2024 11:20
@taniabogatsch taniabogatsch marked this pull request as ready for review December 23, 2024 11:20
@taniabogatsch
Copy link
Contributor Author

Same unrelated Python issues as here: #15433 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants