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

faf-wasm-gen

v2.0.0

Published

FAF .faf generator — Rust→WASM. faf-cli v6.8 / faf_version 3.3, 33-slot Mk4. The generate sibling of faf-wasm-sdk.

Readme

faf-wasm-gen

Rust WASM Generator for FAF (Foundational AI-context Format)

Generate project.faf files in the browser or at the edge.


Mission

Build a Rust WASM generator that matches faf-cli v6.8 output exactly (faf_version "3.3", 33-slot Mk4 model).

Spec: See SPEC.md for complete implementation specification.

Bible: /Users/wolfejam/FAF/cli (faf-cli v6.8) — src/core/slots.ts


Deployment Targets

| Target | Platform | Purpose | |--------|----------|---------| | builder.faf.one | Vercel | Traditional .faf generation (browser + download/commit) | | MCPaaS.live | Cloudflare Workers | MCP generation at edge (+ GitHub commit) | | FAF-Builder | Vercel | Generic version of builder.faf.one |


Architecture

DOUBLE-WHAMMY:

  • This repo (Rust WASM): Generate .faf (211KB)
  • xai-faf-zig (Zig WASM): Score .faf (2.7KB)

Combined: ~213KB total, sub-5ms generation + scoring


Build

Quick Build (if rustup is properly configured)

wasm-pack build --target web --release

Alternative Build (rustup + Homebrew Rust conflict workaround)

If you have both rustup and Homebrew Rust installed on macOS:

# Build WASM binary
RUSTC=~/.rustup/toolchains/stable-x86_64-apple-darwin/bin/rustc \
  ~/.rustup/toolchains/stable-x86_64-apple-darwin/bin/cargo \
  build --target wasm32-unknown-unknown --release

# Generate JS glue code (requires wasm-bindgen-cli)
cargo install wasm-bindgen-cli
wasm-bindgen target/wasm32-unknown-unknown/release/faf_wasm_gen.wasm \
  --out-dir pkg --target web

Output:

  • pkg/faf_wasm_gen_bg.wasm (WASM binary ~1.2MB)
  • pkg/faf_wasm_gen.js (JS glue code)

Optimization:

Optimized binary included in pkg/ (1.04MB final):

wasm-opt -Oz \
  --enable-mutable-globals \
  --enable-bulk-memory \
  --enable-nontrapping-float-to-int \
  --enable-sign-ext \
  --converge \
  --strip-debug --strip-dwarf --strip-producers \
  target/wasm32-unknown-unknown/release/faf_wasm_gen.wasm \
  -o pkg/faf_wasm_gen_bg.wasm

Size Breakdown:

  • Original: 1.19MB
  • Optimized: 1.04MB (11.9% reduction)
  • regex: ~300KB (README pattern matching)
  • chrono: ~200KB (timestamp generation)
  • serde/serde_json: ~150KB (JSON parsing)
  • Core logic: ~400KB

Note: 1.04MB is production-ready. Further reduction to 200-250KB would require removing dependencies and sacrificing features (regex extraction, JSON parsing, etc.).


Deploy

To builder.faf.one:

cp pkg/*.wasm /Users/wolfejam/FAF/grok-faf-elite/static/
cp pkg/*.js   /Users/wolfejam/FAF/grok-faf-elite/static/

To MCPaaS:

cp pkg/*.wasm /Users/wolfejam/FAF/mcpaas-cf/src/
cp pkg/*.js   /Users/wolfejam/FAF/mcpaas-cf/src/

Test

Must pass WJTTC test suite against faf-cli as ground truth:

cargo test

Test repos:

  • grok-1 (Python/JAX, data-science type)
  • test-faf-demo (JavaScript/React)
  • faf-cli (TypeScript CLI)

Success Criteria

✅ Generates current faf_version "3.3" / 33-slot Mk4 .faf ✅ Canonical app types (data-science, frontend, mcp, library, …) ✅ slotignored for slots outside the type's active categories ✅ Round-trips through faf-cli's scorer (mcp 17 / frontend 16 / library 12 active slots) ✅ No "Unknown" hardcoding; score computed on read (not stored)


Status

Implementation: Complete ✅ (730 lines Rust) Tests: 7/7 passing ✅ (4 unit + 3 integration) WASM Build: Optimized ✅ (1.04MB final, 11.9% reduction from 1.19MB) Grok-1 Test: 85% 🥉 Bronze (handoff_ready: true) Owner: wolfejam Date: 2026-02-07


Links

  • SPEC.md - Complete implementation specification
  • faf-cli - Reference implementation (the bible)
  • xai-faf-zig - Zig WASM scorer (2.7KB)

Built with 🦀 Rust + WASM for the edge