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

@hyperlark/hyperlark

v0.1.0-beta.1

Published

Hyperlark is a Rust reimplementation of the Lark parsing toolkit, compiled to WebAssembly, with a JS/TS interface.

Downloads

62

Readme

Hyperlark

Hyperlark is a Rust reimplementation of the Lark parsing toolkit, compiled to WebAssembly, with a JS/TS interface.

Hyperlark can parse all context-free languages. To put it simply, it means that it is capable of parsing almost any programming language out there, and to some degree most natural languages too.

Hyperlark is competitive in speed with the fastest JS parsers, and provides a lot more features and parsing power. Hyperlark also provides interfaces for Python, Rust and C.

Status: 0.1.0-beta.1 — pre-1.0, APIs may still change between betas.

Install

npm install @hyperlark/hyperlark@beta

(Hyperlark is still in beta, so use the beta dist-tag and not latest)

Runs on Node ≥ 22 and in the browser, bundlers, Deno, Bun and edge.

We currently offer 3 entrypoints:

| Entry | Loads the wasm | Compiles .lark source | | --- | --- | --- | | hyperlark | synchronously (Node only) | yes | | hyperlark/web | asynchronously, via await init() | yes | | hyperlark/slim | synchronously (Node only) | no — Lark.fromJSON only |

slim drops the grammar compiler, the heaviest component in the module, for a noticeably smaller download; it can only load a grammar compiled ahead of time.

Not supported: threads. The binding is single-threaded by design.

Hello World

import { Lark, pretty } from "@hyperlark/hyperlark";

const parser = new Lark(`
    start: WORD+
    %import common.WORD
    %ignore " "
`);

const tree = parser.parse("hello world");
console.log(pretty(tree));

In a browser, a bundler, Deno or an edge runtime, import hyperlark/web and await init() once before the first parse. Everything after that is identical:

import init from "@hyperlark/hyperlark/web";

const { Lark } = await init();          // idempotent; auto-fetches the .wasm
const tree = new Lark(grammar).parse("hello world");

For complete, runnable programs — a calculator, JSON streaming, ambiguity, interactive parsing — see the examples page.

Features

  • An industry-standard grammar. Lark is widely used, its grammar syntax was adopted by OpenAI for their official API, and .lark files get syntax highlighting on GitHub.
  • Choose between LALR(1) and Earley (SPPF) parsers. LALR(1) is fast, linear-time and low on memory. Earley can parse every context-free grammar, and can efficiently handle and store every ambiguity, for later queries.
  • Choose between several lexers, or provide your own. Hyperlark provides sophisticated lexers that can help LALR(1) disambiguate tokens based on the parser state, and that help Earley handle lexical ambiguities much faster than scannerless methods. A postlex pass, such as the bundled Indenter, covers indentation-sensitive languages.
  • Automatic tree construction. Use the Transformer / Visitor / Interpreter classes on the parse tree, or pass a transformer to parse(text, { transformer }) to skip tree construction entirely.
  • Interactive parsing (for LALR). Drive the parser and query it at any point of the parse. Useful for error handling, checkpoints & backtracking, and even debugging.
  • Line positions. Hyperlark keeps track of the line and column of every token, and will even propagate the ranges to the tree nodes when propagate_positions: true.
  • Grammar composition. Import rules, terminals, or entire grammars into your grammar, using an inheritance-like interface (namespaces, overrides), for better re-use and modularity.
  • Typed end to end. The package ships its own .d.ts; trees, tokens, errors and options are all typed, and a transformer's fold result is inferred.

Performance

Hyperlark is in the same class as the fastest JS parser libraries, like peggy and chevrotain.

Actual speed depends on grammar, input size and how Hyperlark is used.

For more information, see the benchmarks.

Links

Hyperlark's source hasn't been published at this time.

License

Free for noncommercial use, including evaluation and testing inside commercial organizations. Commercial use requires a separate license — contact [email protected].

Copyright © 2026 Esh Software LLC. Full text in the LICENSE file in the package.