Skip to content

allow unsupported platform when duckdb.node present#350

Merged
jraymakers merged 1 commit intoduckdb:mainfrom
louwers:allow-unsupported-platform
Dec 28, 2025
Merged

allow unsupported platform when duckdb.node present#350
jraymakers merged 1 commit intoduckdb:mainfrom
louwers:allow-unsupported-platform

Conversation

@louwers
Copy link
Copy Markdown
Contributor

@louwers louwers commented Dec 28, 2025

Right now, if you try to run duckdb-node-neo on an unsupported platform, it will always fail.

This PR changes that and will try to load a library with the name @duckdb/node-bindings/${platform}-${arch}/duckdb.node regardless if it is a supported platform.

This will allow third party authors to create libraries for platforms that are not officially supported. Users can then install these libraries using an alias which is supported by all major Node.js package managers:

npm install <alias>@npm:<name>

For example if someone publishes a library which provides a duckdb.node for FreeBSD, it could be installed like this:

npm install @duckdb/node-bindings-freebsd-x64@npm:<name>

And now it will be picked up by getNativeNodeBinding after this change.

If a library is not present, it will fail with the same error as before.

Copy link
Copy Markdown
Collaborator

@jraymakers jraymakers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable extension point, with little to no impact for supported cases.

@jraymakers jraymakers merged commit 3bc9cb9 into duckdb:main Dec 28, 2025
5 checks passed
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.

2 participants