Skip to content

n-api bindings #1121

Open
Open
@bnoordhuis

Description

@bnoordhuis

Relevant: https://nodejs.org/docs/v24.3.0/api/n-api.html

nodejs/node#58852 got me thinking: third-party n-api bindings for quickjs exist but first-party > third-party, so maybe we should add them?

Node.js has comprehensive API coverage in test/js-native-api and that test suite should work, by and large, with any n-api provider.

js_native_api.h is the API surface we'd need to implement. There's some node/V8-specific stuff that doesn't map 1-to-1 to quickjs concepts (e.g. napi_adjust_external_memory) but it's probably okay to fail with napi_generic_failure there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions