{"id":15018374,"url":"https://github.com/nativescript/runtime-node-api","last_synced_at":"2025-10-19T16:30:46.126Z","repository":{"id":254749210,"uuid":"847384922","full_name":"NativeScript/runtime-node-api","owner":"NativeScript","description":"An embeddable, engine-agnostic NativeScript runtime based on Node-API","archived":false,"fork":false,"pushed_at":"2025-01-09T19:15:51.000Z","size":63453,"stargazers_count":28,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-02T13:15:55.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NativeScript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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":"NativeScript","open_collective":"nativescript"}},"created_at":"2024-08-25T17:13:06.000Z","updated_at":"2025-01-26T06:19:05.000Z","dependencies_parsed_at":"2024-09-24T03:21:12.961Z","dependency_job_id":"d6539435-b5b9-49a3-b750-7b69a7a3444f","html_url":"https://github.com/NativeScript/runtime-node-api","commit_stats":{"total_commits":113,"total_committers":5,"mean_commits":22.6,"dds":0.3097345132743363,"last_synced_commit":"94dff8067999296ebdc1bed9c68bb0c0a39b327d"},"previous_names":["nativescript/runtime-node-api"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fruntime-node-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fruntime-node-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fruntime-node-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fruntime-node-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NativeScript","download_url":"https://codeload.github.com/NativeScript/runtime-node-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237163196,"owners_count":19265226,"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":[],"created_at":"2024-09-24T19:51:53.752Z","updated_at":"2025-10-19T16:30:46.121Z","avatar_url":"https://github.com/NativeScript.png","language":"C","readme":"# NativeScript (Node-API)\n\nAn embeddable, engine-agnostic NativeScript runtime based on [Node-API](https://nodejs.org/api/n-api.html) and [libffi](https://github.com/libffi/libffi).\n\nThis library allows any JavaScript engine or runtime that supports Node-API to access native APIs directly from JavaScript. At present, it supports accessing Objective-C APIs (thus most of the iOS and macOS SDKs). We hope to support other native APIs, such as the Java-based Android SDK, in future.\n\n## Initializing the repo\n\nThe repo makes use of npm [workspaces](https://docs.npmjs.com/cli/v10/using-npm/workspaces), so installation is straightforward.\n\n```sh\nnpm install\n```\n\n## Generating the metadata\n\n```sh\n# ① Build the metadata generator.\ndeno task build-metagen\n# Output:\n#   metadata/build/Release/MetadataGenerator\n\n# ② Generate metadata for iOS.\ndeno task metagen ios\n# Output:\n#   metadata/metadata.ios.arm64.nsmd\n#   metadata/metadata.ios.x86_64.nsmd\n#   packages/ios/types/*.d.ts\n\n# ③ Generate metadata for macOS.\ndeno task metagen macos\n# Output:\n#   metadata/metadata.macos.arm64.nsmd\n#   metadata/metadata.macos.x86_64.nsmd\n#   packages/macos/types/*.d.ts\n```\n\n## Building the runtimes\n\n```sh\n# Build the runtime for macOS.\ndeno task build macos\n# Output:\n#   packages/macos/build/macos/Release/libNativeScript.dylib\n#   packages/macos/dist/macos/NativeScript.node\n\n# Build the runtime for iOS as a universal binary.\ndeno task build ios-universal\n# Output:\n#   packages/ios/build/ios/Release-iphoneos/NativeScript.framework/NativeScript\n#   packages/ios/build/ios-sim/Release-iphonesimulator/NativeScript.framework/NativeScript\n#   packages/ios/dist/ios-universal/NativeScript.xcframework\n```\n\n## Run examples\n\nThese macOS AppKit examples depend upon having run the \"Generating metadata\" and \"Building the runtimes\" for macOS already.\n\n```sh\nnode examples/foundation.js\n# or\ndeno run -A examples/foundation.js\n\n# ML Compute example\nnode examples/mlcompute.js\n\n# AppKit related examples\nnode examples/appkit.js\nnode examples/split_view.js\nnode examples/view_controller.js\nnode examples/spritekit.js\n```\n\n## Copyright notice\n\nCopyright [OpenJS Foundation](https://openjsf.org) and `NativeScript` contributors. All rights reserved. The [OpenJS Foundation](https://openjsf.org) has registered trademarks and uses trademarks. For a list of trademarks of the [OpenJS Foundation](https://openjsf.org), please see our [Trademark Policy](https://trademark-policy.openjsf.org/) and [Trademark List](https://trademark-list.openjsf.org/). Trademarks and logos not indicated on the [list of OpenJS Foundation trademarks](https://trademark-list.openjsf.org) are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.\n\n[The OpenJS Foundation](https://openjsf.org/) | [Terms of Use](https://terms-of-use.openjsf.org/) | [Privacy Policy](https://privacy-policy.openjsf.org/) | [OpenJS Foundation Bylaws](https://bylaws.openjsf.org/) | [Trademark Policy](https://trademark-policy.openjsf.org/) | [Trademark List](https://trademark-list.openjsf.org/) | [Cookie Policy](https://www.linuxfoundation.org/cookies/)\n\n\u003ch3 align=\"center\"\u003eMade with ❤️\u003c/h3\u003e\n","funding_links":["https://github.com/sponsors/NativeScript","https://opencollective.com/nativescript"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fruntime-node-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript%2Fruntime-node-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fruntime-node-api/lists"}