Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

duckdb/duckdb-go-bindings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests status

This repository wraps DuckDB's C API calls in Go native types and functions.

Minimum Go version: 1.24.

🚧 WORK IN PROGRESS 🚧

Important

Some type aliases and function wrappers are still missing.

Breaking changes can happen.

Releases

This module'sfirst release contains DuckDB's v1.2.0 release.

duckdb versionmain moduledarwin amddarwin armlinux amdlinux armwindows amd
v1.4.3v0.1.24v0.1.24v0.1.24v0.1.24v0.1.24v0.1.24
v1.4.2v0.1.23v0.1.23v0.1.23v0.1.23v0.1.23v0.1.23
v1.4.1v0.1.21v0.1.21v0.1.21v0.1.21v0.1.21v0.1.21
v1.4.0v0.1.19v0.1.19v0.1.19v0.1.19v0.1.19v0.1.19
v1.3.2v0.1.17v0.1.12v0.1.12v0.1.12v0.1.12v0.1.12
v1.3.1v0.1.16v0.1.11v0.1.11v0.1.11v0.1.11v0.1.11
v1.3.0v0.1.15v0.1.10v0.1.10v0.1.10v0.1.10v0.1.10
v1.2.2v0.1.14v0.1.9v0.1.9v0.1.9v0.1.9v0.1.9
v1.2.1v0.1.13v0.1.8v0.1.8v0.1.8v0.1.8v0.1.8
v1.2.0v0.1.10v0.1.5v0.1.5v0.1.5v0.1.5v0.1.5

The main module (github.com/duckdb/duckdb-go-bindings) does not link any pre-built static library.

Releasing a new duckdb version

  1. Create a new branch and update theDUCKDB_VERSION in theMakefile.
  2. Invoke theFetch and Push Libs workflow on the new branch.
  3. Update theReleases table in theREADME.md.
  4. If the header (duckdb.h) has changes (non-bugfix release), add all changes (new types, functions, etc.) to the bindings.
  5. Open a PR.
  6. Wait for all tests to pass.
  7. Merge the PR intomain.
  8. 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.

Using a pre-built static library

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-amd64
    • darwin-arm64
    • linux-amd64
    • linux-arm64
    • windows-amd64

Static linking

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_lib

On Linux.

CGO_ENABLED=1 CPPFLAGS="-DDUCKDB_STATIC_BUILD" CGO_LDFLAGS="-lduckdb -lstdc++ -lm -ldl -L/path/to/lib" go build -tags=duckdb_use_static_lib

On 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_lib

Dynamic linking

On Darwin.

CGO_ENABLED=1 CGO_LDFLAGS="-lduckdb -L/path/to/dir" DYLD_LIBRARY_PATH=/path/to/dir go build -tags=duckdb_use_lib

On Linux.

CGO_ENABLED=1 CGO_LDFLAGS="-lduckdb -L/path/to/dir" LD_LIBRARY_PATH=/path/to/dir go build -tags=duckdb_use_lib

Arrow functions

Provide the duckdb_arrow build tag if you want to use arrow functions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp