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

alternate implementation #5

Merged
merged 80 commits into from
Aug 17, 2024
Merged

alternate implementation #5

merged 80 commits into from
Aug 17, 2024

Conversation

jraymakers
Copy link
Contributor

Merge alternate implementation into main.

Highlights of this implementation:

  • Works on Darwin ARM64 (Apple Silicon), Linux x64, and Win32 x64.
  • GitHub Actions workflow builds and tests bindings & API and publishes NPM packages (currently to GitHub Packages registry in this repository).
  • NPM packages are split: one for the high-level API, one for the low-level bindings, and one for each supported platform to hold platform-specific binaries.
  • Installation of the correct platform-specific binaries is handled automatically by NPM using optional dependencies and platform & architecture tags. No install scripts are required.
  • Released DuckDB binaries are used; DuckDB is not rebuilt.
  • Bindings are hand-written (not generated), but in a very mechanical style that should make detecting and incorporating upstream changes as easy as possible.
  • Bindings map C parameters and return values into as-close-as-possible concepts in JS. In particular, Napi::External is used to safely and efficiently wrap objects created and returned by the C API.
  • API wraps the C API and exposes a more natural object-oriented JavaScript API.
  • API supports converting all DuckDB data types into easy-to-use JS objects, without loss of precision.
  • API is written in TypeScript and packages including full type definitions.
  • Both bindings and API have good unit test coverage.
  • Not all APIs are implemented yet, but running queries (including streaming & prepared) works.

@jraymakers jraymakers merged commit c249cca into main Aug 17, 2024
6 checks passed
@jraymakers jraymakers deleted the jray/alt branch October 5, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant