npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nativescript/android-primjs

v0.0.1

Published

NativeScript for Android using Node-API

Readme

NPM Version (with dist tag) NPM Version (with dist tag) NPM Version (with dist tag) NPM Version (with dist tag)

NativeScript is an open-source framework for building truly native mobile applications using JavaScript. This repository contains the source code for the Node-API based Android Runtime used by NativeScript.

The Android Runtime is a key component of the NativeScript framework. It is responsible for executing JavaScript code on Android devices. The runtime is built on top of Node-API and provides a way to interact with the Android platform APIs from JavaScript.

The new runtime is based on the Node-API and is designed to be more stable, faster, and easier to maintain. It also supports multiple JavaScript engines, including V8, QuickJS, Hermes, and JavaScriptCore.

Project structure

The repo is structured in the following projects (ordered by dependencies):

  • android-metadata-generator - generates metadata necessary for the Android Runtime.
  • android-binding-generator - enables Java & Android types to be dynamically created at runtime. Needed by the extend routine.
  • android-runtime - contains the core logic behind the NativeScript's Android Runtime. This project contains native C++ code and needs the Android NDK to build properly.
  • android-runtime-testapp - this is a vanilla Android Application, which contains the tests for the runtime project.
  • napi-implementations - contains the implementation of the Node-API for each supported JS engine.

Helper Projects

Build Prerequisites

Following are the minimal prerequisites to build the runtime package.

  • Install the latest Android Studio.

  • From the SDK Manager (Android Studio -> Tools -> Android -> SDK Manager) install the following components:

    • Android API Level 23, 24, 25, 26, 27
    • Android NDK
    • Android Support Repository
    • Download Build Tools
    • CMake
    • LLDB

How to Build

Clone the repo:

git clone https://github.com/NativeScript/napi-android.git

Set the following environment variables:

  • JAVA_HOME such that $JAVA_HOME/bin/java points to your Java executable
  • ANDROID_HOME pointing to where you have installed the Android SDK
  • ANDROID_NDK_HOME pointing to the version of the Android NDK needed for this version of NativeScript

Run the following commands to build the runtime:

npm run setup
npm run build

The command will let you interactively choose the JS engine you want to build with. i.e V8, QuickJS, Hermes or JSC, PrimJS, Static Hermes.

  • The build process includes building of the runtime package (both optimized and with unstripped v8 symbol table), as well as all supplementary tools used for the android builds: metadata-generator, binding-generator, metadata-generator, static-binding-generator
  • The result of the build will be in the dist_[engine] folder. For example if you are building with V8, the result will be in the dist_v8 folder.

How to Run Tests

  • Go to subfolder test-app after you built the runtime.

  • Start an emulator or connect a device.

  • Run command

gradlew runtests

Working with the Runtime in Android Studio

  • Open the test-app folder in Android Studio. It represents a valid Android project and you are able to build and run a test application working with the Runtime from the source.

Note: You might need to run the Android Studio from the command line in order to preserve the environment variables. This is in case you get errors like "missing npm" if starting the studio the usual way.

You can change the JS engine used by the runtime by setting the jsEngine property in the build.gradle file in the root of the project. The possible values are QUICKJS, HERMES, JSC or V8.

Contribute

We love PRs! Check out the contributing guidelines. If you want to contribute, but you are not sure where to start - look for issues labeled help wanted.

Get Help

Please, use github issues strictly for reporting bugs or requesting features. For general questions and support, check out Stack Overflow or ask our experts in NativeScript community on Discord.

License

This project is licensed under the Apache License Version 2.0. See the LICENSE file for more info.