- Notifications
You must be signed in to change notification settings - Fork14
License
duckdb/duckdb-go-bindings
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository wraps DuckDB's C API calls in Go native types and functions.
Minimum Go version: 1.24.
Important
Some type aliases and function wrappers are still missing.
Breaking changes can happen.
This module'sfirst release contains DuckDB's v1.2.0 release.
| duckdb version | main module | darwin amd | darwin arm | linux amd | linux arm | windows amd |
|---|---|---|---|---|---|---|
| v1.4.3 | v0.1.24 | v0.1.24 | v0.1.24 | v0.1.24 | v0.1.24 | v0.1.24 |
| v1.4.2 | v0.1.23 | v0.1.23 | v0.1.23 | v0.1.23 | v0.1.23 | v0.1.23 |
| v1.4.1 | v0.1.21 | v0.1.21 | v0.1.21 | v0.1.21 | v0.1.21 | v0.1.21 |
| v1.4.0 | v0.1.19 | v0.1.19 | v0.1.19 | v0.1.19 | v0.1.19 | v0.1.19 |
| v1.3.2 | v0.1.17 | v0.1.12 | v0.1.12 | v0.1.12 | v0.1.12 | v0.1.12 |
| v1.3.1 | v0.1.16 | v0.1.11 | v0.1.11 | v0.1.11 | v0.1.11 | v0.1.11 |
| v1.3.0 | v0.1.15 | v0.1.10 | v0.1.10 | v0.1.10 | v0.1.10 | v0.1.10 |
| v1.2.2 | v0.1.14 | v0.1.9 | v0.1.9 | v0.1.9 | v0.1.9 | v0.1.9 |
| v1.2.1 | v0.1.13 | v0.1.8 | v0.1.8 | v0.1.8 | v0.1.8 | v0.1.8 |
| v1.2.0 | v0.1.10 | v0.1.5 | v0.1.5 | v0.1.5 | v0.1.5 | v0.1.5 |
The main module (github.com/duckdb/duckdb-go-bindings) does not link any pre-built static library.
- Create a new branch and update the
DUCKDB_VERSIONin theMakefile. - Invoke the
Fetch and Push Libsworkflow on the new branch. - Update the
Releasestable in theREADME.md. - If the header (
duckdb.h) has changes (non-bugfix release), add all changes (new types, functions, etc.) to the bindings. - Open a PR.
- Wait for all tests to pass.
- Merge the PR into
main. - Publish the tags by incrementing the latest tagged release for the main module, and for each OS+architecture combination.
git tag <tagname>git push origin <tagname>Example PR:#19.
A few pre-built static libraries exist for different OS + architecture combinations.You can import these into your projects without providing additional build flags.CGO must be enabled, and your system needs a compiler available.
Here's a list:
github.com/duckdb/duckdb-go-bindings/...darwin-amd64darwin-arm64linux-amd64linux-arm64windows-amd64
Note that the lib(s) name must match the name provided in theCGO_LDFLAGS.
On Darwin.
CGO_ENABLED=1 CPPFLAGS="-DDUCKDB_STATIC_BUILD" CGO_LDFLAGS="-lduckdb -lc++ -L/path/to/lib" go build -tags=duckdb_use_static_libOn Linux.
CGO_ENABLED=1 CPPFLAGS="-DDUCKDB_STATIC_BUILD" CGO_LDFLAGS="-lduckdb -lstdc++ -lm -ldl -L/path/to/lib" go build -tags=duckdb_use_static_libOn Windows.
CGO_ENABLED=1 CPPFLAGS="-DDUCKDB_STATIC_BUILD" CGO_LDFLAGS="-lduckdb -lws2_32 -lwsock32 -lrstrtmgr -lstdc++ -lm --static -L/path/to/lib" go build -tags=duckdb_use_static_libOn Darwin.
CGO_ENABLED=1 CGO_LDFLAGS="-lduckdb -L/path/to/dir" DYLD_LIBRARY_PATH=/path/to/dir go build -tags=duckdb_use_libOn Linux.
CGO_ENABLED=1 CGO_LDFLAGS="-lduckdb -L/path/to/dir" LD_LIBRARY_PATH=/path/to/dir go build -tags=duckdb_use_libProvide the duckdb_arrow build tag if you want to use arrow functions
About
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors4
Uh oh!
There was an error while loading.Please reload this page.