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

@lynx-js/lynx-library-headers

v0.0.4

Published

Lynx embedder C/C++ API and weak N-API headers for native libraries

Readme

@lynx-js/lynx-library-headers

Header package for Lynx embedder C/C++ API and weak N-API based native libraries. This package provides headers and CMake helpers; it does not scaffold, build, or register libraries.

Usage

Resolve the package root from your build script, then add include/ to the native target include directories:

const path = require('node:path');
const headersRoot = path.dirname(
  require.resolve('@lynx-js/lynx-library-headers/package.json')
);

For Windows Lynx native library builds, include the packaged CMake helper to resolve the host runtime import library used by the generated native target:

include("${headersRoot}/cmake/lynx-library-headers.cmake")
lynx_link_lynxtron_runtime(your_target)

The helper resolves the Windows import library from the runtime package installed with @lynx-js/lynx-library-headers. You can override discovery with -DLYNXTRON_IMPORT_LIB=/path/to/lynxtron.dll.lib.

The published package contains:

  • Lynx embedder C API headers.
  • Lynx embedder C++ wrapper headers such as lynx_native_view.h, lynx_value.h, and lynx_view.h.
  • Weak N-API headers used by Lynx native modules.
  • Lynx value C API headers required by the embedder C API.
  • lynx_extension.h and lynx/extension.h convenience wrapper headers.
  • lynx/registration.h for generic embedder static registration helpers.
  • cmake/lynx-library-headers.cmake for resolving Windows runtime import libraries used by Lynx native library builds.

Lynx native libraries use static registration from the native library:

#include <lynx/registration.h>

void BindDemoModule(::lynx::registration::LynxNapiEnv env,
                    ::lynx::registration::LynxNapiValue exports);
lynx_native_view_t* CreateDemoView(void* opaque);

LYNX_REGISTER_NATIVE_MODULE("DemoModule", BindDemoModule)
LYNX_REGISTER_ELEMENT(
    "DemoModule",
    "x-demo-view",
    CreateDemoView)

Use LYNX_REGISTER_NATIVE_MODULE for Lynx weak N-API native modules and LYNX_REGISTER_ELEMENT for Lynx native view elements. A library that exposes both features should call both macros, keeping the native module and element registrations separate.

A host runtime that loads the native library is enough for these static registrations to run.

Run npm run copy-headers in this package when updating the source headers.