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

@lucent-lang/lucent

v0.2.0

Published

Write native React Native modules in TypeScript: the Lucent compiler, CLI, Metro integration, Expo config plugin and editor plugin

Readme

@lucent-lang/lucent

[!WARNING] Experimental: not for production. APIs and the language subset change without a migration path.

Write React Native native modules in TypeScript. Lucent compiles a checked subset to C++ and calls it through JSI: no Swift or Kotlin to write, and no JavaScript engine in native code.

// src/geo.lucent.ts
export type Point = { x: number; y: number };

export function squaredDistance(a: Point, b: Point): number {
  const dx = a.x - b.x;
  const dy = a.y - b.y;
  return dx * dx + dy * dy;
}
import { squaredDistance } from "./src/geo.lucent";
squaredDistance({ x: 0, y: 0 }, { x: 3, y: 4 }); // 25, computed in C++

A module also calls the iOS and Android SDKs directly, typed from your Xcode and Android SDK. One module holds both platforms:

// src/clipboard.lucent.ts
import { PLATFORM } from "lucent:platform";
import { UIPasteboard } from "lucent:ios/UIKit";
import { ClipboardManager, ClipDescription } from "lucent:android/android.content";
import { appContext } from "lucent:android";
import { main } from "lucent:thread";

export async function hasStringAsync(): Promise<boolean> {
  if (PLATFORM === "ios") {
    return UIPasteboard.general.hasStrings;
  } else {
    return main(
      () =>
        appContext()
          .getSystemService(ClipboardManager)
          ?.getPrimaryClipDescription()
          ?.hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN) ?? false,
    );
  }
}

Install

You need React Native 0.88 or later, or Expo SDK 58 in a development build, and Node 22.12 or later.

npm i -D @lucent-lang/lucent
npx lucent init

lucent init sets the app up (the Metro config, the Expo plugin or the Gradle task, tsconfig.json, .gitignore, a first module), showing each change as a diff and asking before applying it. Lucent adds native code, so an Expo app runs as a development build (npx expo run:ios, npx expo run:android), not in Expo Go.

npx lucent doctor checks your machine: Xcode, the Android SDK and NDK, the JDK, and the app's setup.

What's in the package

  • The lucent CLI: init, build, check, dev, doctor, sdk and more (npx lucent --help).
  • The compiler, which Metro runs on *.lucent.ts files through @lucent-lang/lucent/metro.
  • The Expo config plugin (@lucent-lang/lucent in app.json's plugins).
  • An editor plugin that shows Lucent's diagnostics in TypeScript-aware editors (@lucent-lang/lucent/ts-plugin).
  • @lucent-lang/lucent/core: the JavaScript version of lucent:core, for tests that run Lucent modules as plain TypeScript.

Docs

What is Lucent · Install · Tutorial · How it works · Guides · Reference · Examples · Changelog

Issues and source: github.com/Fausto95/lucent.

MIT