René's URL Explorer Experiment


Title: feat(windows-napi): take Node-API from the modules NAPI_HOST_MODULES names by NathanWalker · Pull Request #46 · NativeScript/windows · GitHub

Open Graph Title: feat(windows-napi): take Node-API from the modules NAPI_HOST_MODULES names by NathanWalker · Pull Request #46 · NativeScript/windows

X Title: feat(windows-napi): take Node-API from the modules NAPI_HOST_MODULES names by NathanWalker · Pull Request #46 · NativeScript/windows

Description: Summary windows-napi can now run in a host whose executable doesn't export Node-API. The embedder lists the modules that do in NAPI_HOST_MODULES, ;-separated and in priority order, and napi-sys takes each napi_* from the first module that exports it. Why React Native for Windows needs it (NativeScript/runtimes#112). @nativescript/react-native runs the addon in a Hermes runtime made through hermes.dll's jsr_* API: hermes.dll has the engine half of Node-API (js_native_api.h, 115 functions), but none of Node's (node_api.h). napi-rs calls napi_create_threadsafe_function and napi_add_env_cleanup_hook during registration (create_custom_gc), so the addon panicked with "Node-API symbol has not been loaded". The React Native module implements Node's half itself and sets NAPI_HOST_MODULES=;. Change packages/vendor/napi-sys (load_all): with NAPI_HOST_MODULES set, load each listed module, and load the symbol groups from them in reverse order. A symbol a library lacks keeps its earlier value, so each one ends up from the first library that has it. Without the variable, nothing changes. The workspace patches napi-sys with the vendored copy ([patch.crates-io]), as windows-hermes already did, so windows-napi gets it. windows-napi/README.md: "Embedding outside Node". Evidence Built with cargo build -p windows-napi --release. The resulting windows_napi.dll ran in a react-native-windows 0.83.2 app through @nativescript/react-native's Windows module: sync WinRT, awaited async operations, console and errors all work (details in the runtimes PR). Found along the way (not fixed here) GUID marshalling in the Node-API engine. NativeType::try_from("Guid") returns Pointer (runtime/src/value.rs). A string argument then can't be parsed as a pointer, so the callee gets a null or zero GUID: BitmapEncoder.CreateAsync(id, stream) fails with WINCODEC_ERR_COMPONENTNOTFOUND (0x88982F50) for any form of the id. On return, a 16-byte GUID is written into an 8-byte pointer slot and then read as an object pointer, which crashes (BitmapEncoder.JpegEncoderId, BitmapCodecInformation.CodecId). The classic engine special-cases Guid (guid_ptr_to_js_object, parse_guid_str); the Node-API engine needs the same for parameters (napi_parse_arg) and return slots (method_call.rs / property_call.rs size it as a pointer). XAML stops laying out after the last island closes. Once every XamlWindow on a thread has closed, new ones stay 0×0 (XamlRoot.IsHostVisible false). A hidden, never-closed island works around it.

Open Graph Description: Summary windows-napi can now run in a host whose executable doesn't export Node-API. The embedder lists the modules that do in NAPI_HOST_MODULES, ;-separated and in priority order, and napi-sys...

X Description: Summary windows-napi can now run in a host whose executable doesn't export Node-API. The embedder lists the modules that do in NAPI_HOST_MODULES, ;-separated and in priority order, and napi...

Opengraph URL: https://github.com/NativeScript/windows/pull/46

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f6aafed7-5755-c74a-44af-7b9f8909547c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEB44:38E318:1303577:17F71CA:6B015BC8
html-safe-nonce88ba3055c57ad23990e60a427991760aeccce460598ae94a111248a507be5bad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjQ0OjM4RTMxODoxMzAzNTc3OjE3RjcxQ0E6NkIwMTVCQzgiLCJ2aXNpdG9yX2lkIjoiMTUxMDM4NTk4NjU2NjE4Mzg4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4b495abce2d3d33c5065fe9d836d59c01b248ab5d592bf49e17bef85ddc361a9
hovercard-subject-tagpull_request:5195043586
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/NativeScript/windows/pull/46/files
twitter:imagehttps://avatars.githubusercontent.com/u/457187?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/457187?s=400&v=4
og:image:altSummary windows-napi can now run in a host whose executable doesn't export Node-API. The embedder lists the modules that do in NAPI_HOST_MODULES, ;-separated and in priority order, and napi-sys...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/windows git https://github.com/NativeScript/windows.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id373653886
octolytics-dimension-repository_nwoNativeScript/windows
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id373653886
octolytics-dimension-repository_network_root_nwoNativeScript/windows
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/windows/pull/46/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fwindows%2Fpull%2F46%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fwindows%2Fpull%2F46%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=NativeScript%2Fwindows
Reloadhttps://github.com/NativeScript/windows/pull/46/files
Reloadhttps://github.com/NativeScript/windows/pull/46/files
Reloadhttps://github.com/NativeScript/windows/pull/46/files
NativeScripthttps://github.com/NativeScript
windowshttps://github.com/NativeScript/windows
Codehttps://github.com/NativeScript/windows
Issueshttps://github.com/NativeScript/windows/issues
Pull requestshttps://github.com/NativeScript/windows/pulls
Actionshttps://github.com/NativeScript/windows/actions
Projectshttps://github.com/NativeScript/windows/projects
Security and qualityhttps://github.com/NativeScript/windows/security
Insightshttps://github.com/NativeScript/windows/insights
Sign up for GitHub https://github.com/signup?return_to=%2FNativeScript%2Fwindows%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FNativeScript%2Fwindows%2Fissues%2Fnew%2Fchoose
triniwizhttps://github.com/triniwiz
mainhttps://github.com/NativeScript/windows/tree/main
feat/napi-host-moduleshttps://github.com/NativeScript/windows/tree/feat/napi-host-modules
Conversation 1 https://github.com/NativeScript/windows/pull/46
Commits 1 https://github.com/NativeScript/windows/pull/46/commits
Checks 3 https://github.com/NativeScript/windows/pull/46/checks
Files changed https://github.com/NativeScript/windows/pull/46/files
Please reload this pagehttps://github.com/NativeScript/windows/pull/46/files
feat(windows-napi): take Node-API from the modules NAPI_HOST_MODULES names https://github.com/NativeScript/windows/pull/46/files#top
Show all changes 1 commit https://github.com/NativeScript/windows/pull/46/files
ecbc74e feat(windows-napi): take Node-API from the modules NAPI_HOST_MODULES … NathanWalker Nov 6, 2026 https://github.com/NativeScript/windows/pull/46/commits/ecbc74e1e08257a802fee195b47e960718edd111
Clear filters https://github.com/NativeScript/windows/pull/46/files
Please reload this pagehttps://github.com/NativeScript/windows/pull/46/files
Please reload this pagehttps://github.com/NativeScript/windows/pull/46/files
Cargo.toml https://github.com/NativeScript/windows/pull/46/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
functions.rs https://github.com/NativeScript/windows/pull/46/files#diff-286eeb290bbb5a59110553040c28280945b6c01fd1d4c5af0106178d37401dec
README.md https://github.com/NativeScript/windows/pull/46/files#diff-f7479017b835de4e2d2ecfc9cdddfc5e3cd7c0305024343cccbd59986aad544b
Cargo.tomlhttps://github.com/NativeScript/windows/pull/46/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
View file https://github.com/NativeScript/windows/blob/ecbc74e1e08257a802fee195b47e960718edd111/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/windows/pull/46/{{ revealButtonHref }}
https://github.com/NativeScript/windows/pull/46/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
https://github.com/NativeScript/windows/pull/46/files#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
packages/vendor/napi-sys/src/functions.rshttps://github.com/NativeScript/windows/pull/46/files#diff-286eeb290bbb5a59110553040c28280945b6c01fd1d4c5af0106178d37401dec
View file https://github.com/NativeScript/windows/blob/ecbc74e1e08257a802fee195b47e960718edd111/packages/vendor/napi-sys/src/functions.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/windows/pull/46/{{ revealButtonHref }}
https://github.com/NativeScript/windows/pull/46/files#diff-286eeb290bbb5a59110553040c28280945b6c01fd1d4c5af0106178d37401dec
https://github.com/NativeScript/windows/pull/46/files#diff-286eeb290bbb5a59110553040c28280945b6c01fd1d4c5af0106178d37401dec
https://github.com/NativeScript/windows/pull/46/files#diff-286eeb290bbb5a59110553040c28280945b6c01fd1d4c5af0106178d37401dec
windows-napi/README.mdhttps://github.com/NativeScript/windows/pull/46/files#diff-f7479017b835de4e2d2ecfc9cdddfc5e3cd7c0305024343cccbd59986aad544b
View file https://github.com/NativeScript/windows/blob/ecbc74e1e08257a802fee195b47e960718edd111/windows-napi/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/windows/pull/46/{{ revealButtonHref }}
https://github.com/NativeScript/windows/pull/46/files#diff-f7479017b835de4e2d2ecfc9cdddfc5e3cd7c0305024343cccbd59986aad544b
https://github.com/NativeScript/windows/pull/46/files#diff-f7479017b835de4e2d2ecfc9cdddfc5e3cd7c0305024343cccbd59986aad544b
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.