Native extensions for Deno?
Does something like n-api exist for deno? Can't find it in the manual
8 Replies
Deno
Foreign Function Interface API | Manual | Deno
As of Deno 1.13 and later, the FFI (foreign function interface) API allows users
to call libraries written in native languages that support the C ABIs (C/C++,
Rust, Zig, etc.) using
Deno.dlopen
.you can find a lot more info about FFI in https://denonomicon.deno.dev/ (maintained by @aapoalas, not by the Deno core team)
FFI is not the same thing as native extensions.
Native extensions: you write code in C (or whatever), and wrap it in deno types from some header file. you can then import this as a module.
then no, there's nothing like that
there's a PR to add support for n-api, but it's many months old and is unlikely to get merged anytime soon
ok, thanks. just making sure it wasn't called something else
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
GitHub
feat: implement Node API by littledivy · Pull Request #13633 · deno...
This PR implements the NAPI for loading native modules into Deno.
Feature tracking
Environment life cycle APIs
napi_set_instance_data
napi_get_instance_data
Basic Node-API data types
napi...
This?