You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unblock the disabled node-addon-examples (lambdas, noexcept, output paths) #423
packages/node-addon-examples/scripts/copy-examples.mts carries a list of upstream examples we deliberately skip. Most entries are disabled for reasons we accept and won't fix (they use worker_threads, process.argv, node:events, uv.h, or bring their own CMake project). Five carry TODOs instead — i.e. we intend to enable them:
Lambda functions — blocks 1-getting-started/6_object_wrap/napi/, 1-getting-started/7_factory_wrap/napi/ and 2-js-to-native-conversion/8_passing_wrapped/napi/. Three examples for one fix, so this is the highest-value of the three.
Output-directory mismatch — as the TODO notes, gyp-to-cmake should produce projects whose output directory matches what gyp would have produced, so that examples with a require pointing at the conventional gyp path resolve. That would unblock 5-async-work/napi-asyncworker-example/node-addon-api/ and 6-threadsafe-function/promise-callback-demo/node-addon-api/, both currently disabled with "require statement to an unexpected path".
The first two say "Fix C++ support", which is worth pinning down before anyone starts: it is not obvious from the comments whether the failure is in gyp-to-cmake's translation, in a C++ standard/flag we pass, or in the host's C++ surface. Reproducing one of the lambda cases and capturing the actual compiler error is the first step.
Each of the three can land independently. Related to the other gyp-to-cmake gaps: #98, #99, #100, #101, #102, #103.
The lambda TODOs were stale: the current gyp-to-cmake CLI emits cxx_std_17, so the three upstream N-API examples now compile without a transformer change. The PR enables object_wrap, factory_wrap, and passing_wrapped, and adds them to the mobile runtime suite with exact output assertions.
All three compile as universal iOS Simulator XCFrameworks and across the four Android ABIs. Root build, tests, lint, and formatting checks pass. The independent noexcept and output-directory blockers remain intentionally open in this issue.
Activity
huytdps13400 commentedon Aug 30, 2026
Implemented the lambda portion in #457.
The lambda TODOs were stale: the current
gyp-to-cmakeCLI emitscxx_std_17, so the three upstream N-API examples now compile without a transformer change. The PR enablesobject_wrap,factory_wrap, andpassing_wrapped, and adds them to the mobile runtime suite with exact output assertions.All three compile as universal iOS Simulator XCFrameworks and across the four Android ABIs. Root build, tests, lint, and formatting checks pass. The independent
noexceptand output-directory blockers remain intentionally open in this issue.