{"id":19478865,"url":"https://github.com/xan105/node-nodert","last_synced_at":"2025-04-25T15:30:58.425Z","repository":{"id":63691316,"uuid":"555759132","full_name":"xan105/node-nodeRT","owner":"xan105","description":"NodeRT but precompiled (use WinRT API directly from node)","archived":false,"fork":false,"pushed_at":"2024-09-07T04:43:44.000Z","size":1844,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-10T07:41:29.560Z","etag":null,"topics":["node-gyp","nodejs","nodert","precompiled","winrt"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xan105.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"xan105","custom":"https://www.paypal.me/xan105","patreon":"xan105"}},"created_at":"2022-10-22T09:00:13.000Z","updated_at":"2024-09-19T11:44:41.000Z","dependencies_parsed_at":"2024-10-23T20:39:44.199Z","dependency_job_id":"9c97af70-5e54-4a8d-ac12-84a6fcc63712","html_url":"https://github.com/xan105/node-nodeRT","commit_stats":{"total_commits":78,"total_committers":3,"mean_commits":26.0,"dds":0.02564102564102566,"last_synced_commit":"936e71a66af003340edc699761091a7f86d505aa"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xan105%2Fnode-nodeRT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xan105%2Fnode-nodeRT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xan105%2Fnode-nodeRT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xan105%2Fnode-nodeRT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xan105","download_url":"https://codeload.github.com/xan105/node-nodeRT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224008025,"owners_count":17240290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-gyp","nodejs","nodert","precompiled","winrt"],"created_at":"2024-11-10T19:51:46.126Z","updated_at":"2024-11-10T19:51:47.492Z","avatar_url":"https://github.com/xan105.png","language":"JavaScript","readme":"About\n=====\n\nNodeRT but precompiled (use WinRT API directly from node).\n\nUsage is similar to the original NodeRT package(s).\u003cbr /\u003e\nFor more details on NodeRT, please kindly see the corresponding NodeRT package.\n\n📦 Scoped `@xan105` packages are for my own personal use but feel free to use them.\n\nExample\n=======\n\nDummy toast notification\n\n```js\n\nimport * as winRT from \"@xan105/nodert\";\n\nconst xml = new winRT.data.xml.dom.XmlDocument();\nxml.loadXml(xmlString);\n\nconst toast = new winRT.ui.notifications.ToastNotification(xml);\nconst toaster = winRT.ui.notifications.ToastNotificationManager.createToastNotifier(appID);\ntoaster.show(toast);\n\nsetTimeout(() =\u003e {}, 100); //Keep alive\n```\n\n💡 Interested in toast notification ? check out [powertoast](https://www.npmjs.com/package/powertoast).\n\nInstall\n=======\n\n```\nnpm i @xan105/nodert\n```\n\nAn internet connection is required to download the prebuilt binaries. They are [hosted on github](https://github.com/xan105/node-nodeRT/releases).\n\nBy default every NodeRT bindings will be installed.\u003cbr /\u003e\nSimilar to [nodert-npm](https://github.com/NodeRT/nodert-npm/) you can choose to only keep the NodeRT bindings you _do_ need by: \n\n- passing a comma separated list of modules as argument\n\n```\nnpm i @xan105/nodert --modules=\"windows.ui.notifications, windows.data.xml.dom\"\n```\n\n- or by adding a list of modules in your package.json file under the `_nodert/modules` path\n\nFor example, having the following section in your package.json will result with the installation of the \"windows.devices.geolocation\" and \"windows.devices.sensors\" modules:\n\n```json\n\"_nodert\" : {\n  \"modules\" : [\n    \"windows.devices.geolocation\",\n    \"windows.device.sensors\"\n  ]\n},\n```\n\nNodeRT scope used as a base is [nodert-win11-22h2](https://www.npmjs.com/search?q=@nodert-win11-22h2).\u003cbr /\u003e\n`XAML` and `*.preview` WinRT namespaces are removed.\u003cbr /\u003e\nSome namespaces have been kept back to `win10-rs4` due to compilation failure (regression).\n\nList of namespaces can be found [here](https://github.com/xan105/node-nodeRT/tree/main/packages) (GitHub).\n\n### ABI\n\nNodeRT packages are not using [n-api](https://nodejs.org/api/n-api.html#node-api) they must be compiled for every ABI.\u003cbr /\u003e\nUnless exception, expect prebuilds for current and previous Node.js LTS releases (x64 / ARM64).\u003cbr /\u003e\n⚠️ Due to the fast Electron release cycle, do not expect this package to always keep up with the latest.\n\nList of provided ABI can be found [here](https://github.com/xan105/node-nodeRT/blob/main/integrity.json) (GitHub) or in the corresponding GitHub release.\n\nℹ️ You may want to check previous versions of this package if you are still using an older version of Node or Electron. \nOlder versions are dropped over time due to usage of new features and the like.\n\n### Electron\n\nSwitching to Electron ABI instead of Node can be done by adding the `--electron` flag or the env. variable `npm_config_runtime` set to `electron`.\u003cbr /\u003e\n\nAlternatively in your package.json file under the `_nodert` path:\n\n```json\n\"_nodert\" : {\n  \"runtime\": \"electron\",\n  \"modules\" : [\n    \"windows.devices.geolocation\",\n    \"windows.device.sensors\"\n  ]\n},\n```\n\nℹ️ Electron's `packages.json` file will be read to determine Electron's ABI _(I recommend you install it first to avoid any surprise)_.\n\n💡 In case npm mutes the output of the install script; You can check inside `node_modules/@xan105/nodeRT/prebuilds` which runtime was downloaded: `node` or `electron`.\n\n⚠️ NodeRT should be loaded in the main process [NodeRT#158](https://github.com/NodeRT/NodeRT/issues/158)\n\nAPI\n===\n\n\u003e Please see the [NodeRT](https://github.com/NodeRT/NodeRT#using-nodert-modules) and [Microsoft](https://learn.microsoft.com/en-us/uwp/api/) docs for more details.\n\n⚠️  This module is only available as an ECMAScript module (ESM).\n\nWinRT namespaces are also exported under their respective namespace:\n\n```js\nimport { ui } from \"@xan105/nodert\" \nconst toast = new ui.notifications.ToastNotification(xml);\n\nimport { notifications } from \"@xan105/nodert/ui\" \nconst toast = new notifications.ToastNotification(xml);\n```\n\n⚠️ Please be warned that in case of missing bindings the corresponding exports will be **undefined**.\u003cbr /\u003e\nThey are a couple of them due to compilation failure.\n\n🐞 NB: Provided types are those from NodeRT packages. I know they have some errors but I haven't the courage to fix them up by hand.\n\nBuild Env\n=========\n\n🆚 Visual Studio 2022:\n\n  + Visual Studio Installer:\n    \n    - C++ core features\n    - MSVC v143 - VS 2022 C++ x86/x64 build tools (latest)\n    - MSVC v140 - VS 2015 C++ build tools (v14.00) //VS2015 build tools\n    - C++ ATL for latest v143 (x86 \u0026 x64)\n    - C++ MFC for latest v143 (x86 \u0026 x64)\n    - MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (latest)\n    - C++ ATL for latest v143 (ARM64/ARM64EC)\n    - C++ MFC for latest v143 (ARM64/ARM64EC)\n    - Windows 11 SDK 22h2 (10.0.22621.0)\n  \n  + Manual:\n    - [Windows 10 SDK rs4 (10.0.17134.0)](https://go.microsoft.com/fwlink/p/?linkid=870807)\n\n⬢ Node.js native addon:\n\n  - Node.js v20.12.2\n  - npm v10.5.0\n  - node-gyp v10.1.0\n  - nan v2.19.0\n  - Python3 v3.11.3\n","funding_links":["https://github.com/sponsors/xan105","https://www.paypal.me/xan105","https://patreon.com/xan105"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxan105%2Fnode-nodert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxan105%2Fnode-nodert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxan105%2Fnode-nodert/lists"}