Skip to content

lib,src,test,doc: add node:ffi module#62072

Draft
cjihrig wants to merge 1 commit intonodejs:mainfrom
cjihrig:ffi
Draft

lib,src,test,doc: add node:ffi module#62072
cjihrig wants to merge 1 commit intonodejs:mainfrom
cjihrig:ffi

Conversation

@cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Mar 2, 2026

This is not ready for review yet. Just opening to see if this is something the project is still interested in.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. labels Mar 2, 2026
@anonrig
Copy link
Member

anonrig commented Mar 2, 2026

Yes

Copy link
Member

@Qard Qard left a comment

Choose a reason for hiding this comment

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

Looks very cool! I'm glad to see someone has picked this back up. 🙂

I did a quick review and it all looks good. My only comment is there seems to be a bunch of static strings and a private symbol which we might want to define in env_properties.h.

Comment on lines +47 to +57
Local<Private> GetPointerAddressPrivate(Isolate* isolate) {
static Eternal<Private> private_symbol;
Local<Private> priv = private_symbol.Get(isolate);
if (priv.IsEmpty()) {
priv = Private::ForApi(
isolate,
String::NewFromUtf8Literal(isolate, "node:ffi:pointer_address"));
private_symbol.Set(isolate, priv);
}
return priv;
}
Copy link
Member

Choose a reason for hiding this comment

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

Should this not be defined in PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants