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

hardyscript

v1.5.2

Published

HardyScript: JavaScript/TypeScript → COUNPRE64 / ESP32 / Arduino / STM32 / Raspberry Pi unified hardware programming compiler

Readme

HardyScript

An AOT compiler that forges JavaScript into machine code.

把 JavaScript 锻造成机器码的 AOT 编译器。

npm License: MIT


Write standard JavaScript/TypeScript. Compile to bare-metal firmware. Flash to real hardware.

写标准 JavaScript/TypeScript,编译为裸机固件,烧录到真实硬件。

Supported Targets

| Platform | Output | Status | |----------|--------|--------| | ESP32 / ESP32-S3 | ESP-IDF C project | ✅ | | Arduino (Uno/Nano/Mega) | Arduino .ino | ✅ | | STM32 (F103) | Makefile + OpenOCD | ✅ | | Raspberry Pi | Native C + Makefile | ✅ | | COUNPRE64 | Custom 64-bit ISA machine code | ✅ |

Quick Start

Install

npm install -g hardyscript

Or build from source (requires Rust):

git clone https://github.com/hardyscript-cpu/HardyScript.git
cd HardyScript
cargo install --path .

Usage

# Compile JS to firmware
hardy build blink.js --target esp32

# Flash to board
hardy flash output.hex --port COM4

# Serial monitor
hardy monitor --port COM4

# AI model generation (gesture recognition)
hardy model generate --output gesture.duanyan

# Package manager
hardy pack init
hardy pack install math-utils

Example

// blink.js — ESP32 LED blink
const LED = 2;

pinMode(LED, OUTPUT);

setInterval(() => {
  digitalWrite(LED, !digitalRead(LED));
}, 500);
hardy build blink.js --target esp32
hardy flash blink.hex --port COM4

That's it. No C. No toolchain setup. No SDK.

Features

  • Zero learning curve — Write standard JS/TS, no proprietary syntax
  • AOT compilation — No interpreter overhead, native performance
  • Multi-platform — One codebase, five hardware targets
  • TypeScript support — Full type annotation stripping
  • async/await — Event-driven embedded programming
  • AI runtime — On-device gesture recognition (Duanyan engine)
  • Package managerhardy pack for embedded libraries
  • Serial tooling — Built-in flasher + monitor
  • CI/CD readyhardy ci for automated build pipelines

Architecture

JavaScript / TypeScript
        │
        ▼
   ┌─────────┐
   │  Lexer  │
   └────┬────┘
        ▼
   ┌─────────┐
   │ Parser  │  → AST
   └────┬────┘
        ▼
   ┌───────────┐
   │ Optimizer │  → Constant folding, DCE, inlining
   └────┬──────┘
        ▼
   ┌──────────────┐
   │ Code Generator│
   └──────┬───────┘
          ▼
  ┌───────────────────────────────┐
  │ ESP32 │ Arduino │ STM32 │ RPi │ COUNPRE64 │
  └───────────────────────────────┘

CLI Commands

| Command | Description | |---------|-------------| | hardy build <file> | Compile JS/TS to firmware | | hardy flash <hex> | Flash firmware to board | | hardy monitor | Open serial monitor | | hardy model generate | Generate AI gesture model | | hardy model convert | Convert GGUF to Duanyan format | | hardy model benchmark | Generate ESP32 benchmark harness | | hardy pack init/install/publish | Package manager | | hardy ci | Run CI/CD pipeline | | hardy lint <file> | Static analysis |

Building from Source

# Prerequisites: Rust nightly
rustup toolchain install nightly

# Build
cargo build --release

# Test (438 tests)
cargo test

# Install locally
cargo install --path .

Tech Stack

  • Compiler: Rust
  • Custom ISA: COUNPRE64 (16 registers, 32-bit instructions, 64-bit data)
  • AI Engine: Duanyan (INT4 quantized, on-device inference)
  • Package Format: .hardy archives

License

MIT © HardyScript Team

Links