Skip to content

doc: fix Fast FFI argument count in ffi.md#63960

Open
watilde wants to merge 1 commit into
nodejs:mainfrom
watilde:fix-ffi
Open

doc: fix Fast FFI argument count in ffi.md#63960
watilde wants to merge 1 commit into
nodejs:mainfrom
watilde:fix-ffi

Conversation

@watilde

@watilde watilde commented Jun 17, 2026

Copy link
Copy Markdown
Member

The text said functions with more than 7 arguments fall back to the generic call path, contradicting the preceding sentence that Fast FFI calls support up to 8 arguments. The implementation only falls back when there are more than 8 arguments (src/ffi/fast.cc), so correct the threshold to 8.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. ffi Issues and PRs related to experimental Foreign Function Interface support. labels Jun 17, 2026
@ShogunPanda

Copy link
Copy Markdown
Contributor

Thanks for this.
It's actually a bit more complicated: it's depending on the architecture. Do you mind comparing with docs in https://github.com/nodejs/node/blob/main/doc/contributing/ffi-fast-api-internals.md and making sure it's correctly listed out for each platform. Otherwise I think you can use a generic formula like ”7 or 8 arguments depending on the architecture".

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

Labels

doc Issues and PRs related to the documentations. ffi Issues and PRs related to experimental Foreign Function Interface support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants