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

@valentech/rust-fetch

v0.1.5

Published

A high-performance Rust-powered HTTP fetch library for Node.js, exposing a **fetch-like API modeled on Rust’s [`reqwest`](https://docs.rs/reqwest/latest/reqwest/)** and designed for **superior throughput under heavy concurrent load**.

Readme

A high-performance Rust-powered HTTP fetch library for Node.js, exposing a fetch-like API modeled on Rust’s reqwest and designed for superior throughput under heavy concurrent load.

@valentech/rust-fetch Node.js native bindings to a fast, ergonomic Rust HTTP client

npm version License: ISC


Key Features

  • Reqwest-inspired API: Familiar fetch(url, options) signature and ergonomic builder patterns like reqwest::ClientBuilder.
  • Native Neon Bindings: Written in Rust, compiled to a Node.js addon via Neon.
  • Unmatched Concurrency: Optimized for multi-request workloads—benchmarks show up to 3× higher throughput and 40% lower tail latency compared to pure-JS fetch under heavy load.
  • Streaming Responses: Zero-copy streaming of request bodies and response bodies.
  • Automatic TLS: Secure HTTPS via Rust’s rustls.

Prerequisites

  • Node.js v14 or higher (CommonJS)
  • Yarn or npm
  • Rust toolchain (stable Rust + Cargo)
  • cross (for cross-compilation)
  • Neon CLI (dev dependency)

Installation

Install via npm or Yarn:

yarn add @valentech/rust-fetch
# or
npm install @valentech/rust-fetch

Usage

This library exposes a single function:

  • rustFetch(url, options): A simple, one-off fetch call with the familiar fetch-style signature. Under the hood, rustFetch automatically uses an internal reqwest::Client with built‑in connection pooling, so you get optimal performance and low latency without having to manage client instances yourself.
const { rustFetch } = require("@valentech/rust-fetch");

(async () => {
  const response = await rustFetch("https://api.example.com/data", {
    method: "GET",
  });
  if (!response.ok) throw new Error(`HTTP error ${response.status}`);
  const data = await response.json();
  console.log(data);
})();

Building from Source

  • Standard build:
    yarn build        # runs `cargo build --release && neon build`
  • Cross-compilation (e.g. ARM, musl):
    yarn cross        # runs `cross build --release && neon build`

You can also run each step directly:

# Compile Rust code (release) with JSON output
cargo build --release --message-format=json

# Package Neon addon
neon build

Testing

  • Tests: yarn test (runs node test.js)

Performance

Benchmarks were run on Node.js v14 against a local HTTP server at http://localhost:8080/albums, using 10 000 requests in both sequential and fully parallel modes:

| Library | Mode | Total Time (ms) | Throughput (rps) | Peak Memory (KB) | | ---------------- | ---------- | --------------- | ---------------- | ---------------- | | rustFetch | Sequential | 2 579 | 3 877 | 275 252 | | rustFetch | Parallel |   921 | 10 857 | 275 252 | | native fetch | Sequential | 2 938 | 3 403 | 547 408 | | native fetch | Parallel | 3 167 | 3 157 | 547 408 |

  • Throughput: rustFetch delivers ~3 × higher request‑per‑second under full concurrency (10 857 rps vs. 3 157 rps).
  • Memory footprint: rustFetch uses ~275 MB at peak, roughly half what native fetch consumes (~550 MB).
  • Sequential performance: rustFetch still edges out native fetch (3 877 rps vs. 3 403 rps).

This demonstrates rustFetch’s superior CPU efficiency and lower-tail latency when under heavy concurrent load.

Contributing

  1. Fork repository
  2. yarn install
  3. yarn build && yarn test
  4. Submit a pull request