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

@tscircuit/krt-wasm

v0.1.6

Published

Fork of KiCad Routing Tools packaged as a WASM autorouter for tscircuit.

Readme

@tscircuit/krt-wasm

This package is a fork of KiCad Routing Tools adapted to run inside tscircuit as a custom autorouter.

The fork keeps the upstream Rust GridRouter core and exposes it through WASM for tscircuit's autorouter={{ algorithmFn }} API. It is not a full port of the KiCad plugin or the Python command-line tools.

Install

bun add @tscircuit/krt-wasm

Usage

import { createKiCadRoutingToolsAutorouter } from "@tscircuit/krt-wasm"

export default () => (
  <board
    width="34mm"
    height="22mm"
    layers={4}
    autorouter={{
      algorithmFn: createKiCadRoutingToolsAutorouter({
        gridStep: 0.1,
        clearance: 0.2,
        maxIterations: 300_000,
      }),
    }}
  >
    {/* components and traces */}
  </board>
)

Build

bun install
bun run build

bun run build compiles the Rust router to WASM with wasm-pack, embeds the WASM loader in pkg-node, and builds the TypeScript wrapper in dist.

What Is Implemented

  • tscircuit GenericLocalAutorouter wrapper with complete, error, and progress events.
  • SimpleRouteJson input support from tscircuit.
  • Sequential routing of each tscircuit connection using the KRT Rust GridRouter::route_multi core.
  • Multi-layer routing with via insertion.
  • Layer names for top, bottom, and generated innerN layers.
  • KiCad-style layer aliases for F.Cu and B.Cu in input layer fields.
  • Rectangular obstacle avoidance from SimpleRouteJson.obstacles.
  • Obstacle layer filtering through layer or layers.
  • Connected-obstacle exemptions for the net currently being routed.
  • Routing bounds enforcement from SimpleRouteJson.bounds.
  • Trace width selection from connection width, nominal width, or input defaults.
  • Configurable grid step, clearance, max iterations, via cost, heuristic weight, turn cost, layer costs, layer direction preferences, and track margin.
  • Basic post-processing to compact collinear route points and collapse very short same-layer tunnels.

What Is Not Implemented

These upstream KiCad Routing Tools features are not available through this npm/WASM package:

  • KiCad PCB parsing or writing.
  • KiCad action plugin UI.
  • Python CLI workflows such as route.py, route_diff.py, route_planes.py, and route_disconnected_planes.py.
  • Differential-pair routing orchestration.
  • Length matching, time matching, trombone generation, or impedance-controlled width calculation.
  • BGA/QFN fanout generation.
  • Power/ground plane generation, plane via stitching, plane region repair, or return-via placement.
  • Rip-up and reroute orchestration across failed nets.
  • MPS net ordering, target swap optimization, polarity swapping, or schematic synchronization.
  • Curved, polygonal, circular, or rotated obstacle geometry beyond the rectangular obstacle approximation consumed from SimpleRouteJson.
  • KiCad net classes, design-rule extraction, DRC reporting, or KiCad board-edge geometry parsing.

Relationship To Upstream

Upstream KiCad Routing Tools is a KiCad-focused project with a Rust router, Python orchestration, KiCad file IO, and a KiCad plugin. This fork packages the Rust grid-router path for tscircuit so that tscircuit boards can call it directly during autorouting.

For KiCad usage, plugin installation, Python CLI commands, and the complete upstream feature set, use the original repository: https://github.com/drandyhaas/KiCadRoutingTools