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

thrust-wasm

v0.2.1

Published

WASM bindings for traffic-thrust core parsers

Readme

thrust-wasm: WASM Bindings for Aviation Data Parsing

thrust-wasm is a WebAssembly binding for the Rust traffic-thrust library, providing high-performance aviation data parsing and resolution in browser and Node.js environments.

Overview

This package exposes efficient resolvers for FAA and EUROCONTROL aviation data, enabling:

  • ICAO Field 15 parsing — Parse flight plan routes and procedures
  • FAA NASR data — Query airport, navaid, and airway definitions
  • FAA ArcGIS helpers — Access geo-tagged aviation facilities
  • EUROCONTROL AIXM data — Parse detailed airspace and procedure definitions
  • EUROCONTROL DDR data — Query route networks and designations

Architecture

The WASM binding exposes high-level resolver classes that abstract away the complexity of data parsing:

┌─────────────────────────────────────────┐
│   TypeScript/JavaScript Application     │
│   (Browser or Node.js)                  │
└────────────────┬────────────────────────┘
                 │
┌────────────────▼────────────────────────┐
│  WASM Resolver Classes (JS-friendly)    │
│  - NasrResolver                         │
│  - EurocontrolResolver                  │
│  - FaaArcgisResolver                    │
│  - Field15Parser                        │
└────────────────┬────────────────────────┘
                 │
┌────────────────▼────────────────────────┐
│  Rust Core Library (traffic-thrust)     │
│  - AIRAC cycle management               │
│  - Field15 tokenization & parsing       │
│  - NASR CSV parsing                     │
│  - AIXM XML parsing                     │
│  - DDR data file parsing                │
└────────────────────────────────────────┘

Quick Start

FAA NASR Data Resolution

import init, { NasrResolver } from "@anomalyco/thrust-wasm";

await init();

const nasrZip = await fetch("/data/28DaySubscription_Effective_2026-02-19.zip")
  .then((r) => r.arrayBuffer());

const resolver = new NasrResolver(new Uint8Array(nasrZip));

// Query airports
const airports = await resolver.airports();
console.log(`Found ${airports.length} airports`);

// Get LAX (Los Angeles International) airport
const lax = await resolver.resolve_airport("KLAX");
console.log(lax.name); // "Los Angeles International"
console.log(lax.latitude, lax.longitude); // 33.9425, -118.4081

// Get JFK (New York) airport
const jfk = await resolver.resolve_airport("KJFK");
console.log(jfk.name); // "John F Kennedy International"

// Resolve a navaid - BAF (Barnes VOR/DME) in Georgia
const baf = await resolver.resolve_navaid("BAF");
console.log(baf.code); // "BAF"
console.log(baf.point_type); // "VOR/DME"

// Resolve a waypoint/fix
const basye = await resolver.resolve_fix("BASYE");
console.log(basye.code); // "BASYE"

// Query an airway
const j48 = await resolver.resolve_airway("J48");
console.log(j48.name); // "J48"

EUROCONTROL DDR Data

import init, { EurocontrolResolver } from "@anomalyco/thrust-wasm";

await init();

const ddrZip = await fetch("/data/ENV_PostOPS_AIRAC_2111.zip")
  .then((r) => r.arrayBuffer());

const ddr = EurocontrolResolver.fromDdrArchive(new Uint8Array(ddrZip));
console.log(ddr.resolve_airport("EHAM"));

ICAO Field 15 Parsing

import init, { parse_field15 } from "@anomalyco/thrust-wasm";

await init();

// Real-world transatlantic route from Europe to North America
const route = "N0490F360 ELCOB6B ELCOB UT300 SENLO UN502 JSY DCT LIZAD DCT MOPAT DCT LUNIG DCT MOMIN DCT PIKIL/M084F380 NATD HOIST/N0490F380 N756C ANATI/N0441F340 DCT MIVAX DCT OBTEK DCT XORLO ROCKT2";
const elements = parse_field15(route);

// Results in structured elements:
// [
//   { speed: { kts: 490 }, altitude: { FL: 360 } },       // Initial cruise
//   { SID: "ELCOB6B" },                                     // Departure procedure at ELCOB
//   { waypoint: "ELCOB" },
//   { airway: "UT300" },                                    // Upper T-route
//   { waypoint: "SENLO" },                                  // Entry to Nat Track
//   { airway: "UN502" },                                    // Upper N-route
//   { waypoint: "JSY" },
//   { direct_routing: "DCT" },                              // Direct routing
//   { waypoint: "LIZAD" },
//   { altitude_change: { FL: 380 } },                       // Altitude change mid-route
//   { nat_routing: "NATD" },                                // NAT designation
//   { waypoint: "HOIST" },
//   { speed_altitude: { kts: 490, FL: 380 } },              // Speed/altitude constraint
//   { waypoint: "N756C" },
//   // ... more elements
// ]

Installation

npm install @anomalyco/thrust-wasm

API Reference

NasrResolver

FAA NASR (National Airspace System Resource) data resolver.

Methods:

  • airports(): Promise<Airport[]> — Get all airports
  • airport(icao: string): Promise<Airport | undefined> — Query specific airport
  • airways(): Promise<Airway[]> — Get all airways
  • navaids(): Promise<Navaid[]> — Get all navaids
  • designated_points(): Promise<DesignatedPoint[]> — Get waypoints
  • airac_cycle(): string — Get AIRAC cycle information

EurocontrolResolver

EUROCONTROL AIXM and DDR data resolver.

Static Methods:

  • fromDdrArchive(zipData: Uint8Array): EurocontrolResolver — Create from DDR archive
  • fromDdrFolder(payload: Record<string, Uint8Array>): EurocontrolResolver — Create from DDR folder payload

Instance Methods:

  • parse_airports(zipData: Uint8Array): void — Parse AIXM airports
  • parse_navaids(zipData: Uint8Array): void — Parse AIXM navaids
  • parse_airways(zipData: Uint8Array): void — Parse AIXM airways
  • resolve_airport(icao: string): Airport | undefined — Query airport
  • resolve_navpoint(name: string): NavPoint | undefined — Query navpoint
  • resolve_nat_routes(): NatTrack[] — Get NAT track information

parse_field15(route: string): Field15Element[]

Parse ICAO Field 15 route string into structured elements.

Design Patterns

Browser vs. Server:

  • Browser: Use pre-subset data to minimize bundle size
  • Server: Use full datasets for complete coverage

DDR Folder Payloads:

When using fromDdrFolder, expected keys are:

{
  "navpoints.nnpt": Uint8Array,
  "routes.routes": Uint8Array,
  "airports.arp": Uint8Array,
  "sectors.are": Uint8Array,
  "sectors.sls": Uint8Array,
  "free_route.are": Uint8Array,
  "free_route.sls": Uint8Array,
  "free_route.frp": Uint8Array,
}

Error Handling:

Most operations throw JsError on invalid input:

try {
  const data = await resolver.airports();
} catch (error) {
  console.error("Error:", error.message);
}

Build Locally

Prerequisites

  • Rust 1.70+
  • Node.js 18+
  • wasm-pack (cargo install wasm-pack)

Build for Web

wasm-pack build crates/thrust-wasm --target web --dev

Build Multi-Target (ESM/Web/Node)

cd crates/thrust-wasm
just pkg

Serve Local Package

python -m http.server 8000 -d crates/thrust-wasm/pkg

Run Tests

cd crates/thrust-wasm/tests-ts
npm test

Data Format Reference

NASR Subscription Files: Download from FAA NASR.

EUROCONTROL AIXM: Available from EUROCONTROL B2B.

  • AirportHeliport.BASELINE.zip
  • Navaid.BASELINE.zip
  • Route.BASELINE.zip
  • DesignatedPoint.BASELINE.zip
  • RouteSegment.BASELINE.zip
  • StandardInstrumentDeparture.BASELINE.zip
  • StandardInstrumentArrival.BASELINE.zip

EUROCONTROL DDR: Available from EUROCONTROL B2B (PostOPS database).

Performance Notes

  • Parsing: WASM is 5-10× faster than JavaScript for large datasets
  • Memory: WASM data structures are more compact
  • Startup: Initial module load takes 100-300ms

License & Attribution

  • FAA NASR: Public domain (U.S. government data)
  • EUROCONTROL AIXM/DDR: Requires license agreement with EUROCONTROL
  • Field 15 parser: Adapted from ICAO-F15-Parser (Apache 2.0)

Contributing

Issues and PRs welcome on GitHub.

License

Apache License 2.0 — See LICENSE file in this directory.