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

tachyon-rs

v0.2.17

Published

HTTP server nativo em Rust com API TypeScript para Node.js e Bun. Rapido, seguro e extensivel.

Readme

tachyon-rs

HTTP server nativo em Rust com API TypeScript para Node.js e Bun. Rapido, seguro e extensivel.

Read in English

Instalacao

npm install tachyon-rs
# ou
bun add tachyon-rs

Quick Start

import { Tachyon, TachyonResponse } from 'tachyon-rs'

new Tachyon()
  .get('/', 'Hello Tachyon!')
  .get('/json', { message: 'fast' })
  .get('/dynamic', (req) => {
    return new TachyonResponse(200, JSON.stringify({ path: req.path }))
  })
  .listen(3000)

Plugins

Hooks de ciclo de vida: pre (antes do handler) e pos (depois do handler).

import { Tachyon, TachyonResponse, type Plugin } from 'tachyon-rs'

const auth: Plugin = {
  pre: (req) => {
    if (!req.header('authorization')) {
      return new TachyonResponse(401, JSON.stringify({ error: 'Unauthorized' }))
    }
  }
}

const cors: Plugin = {
  pre: (req) => {
    if (req.method === 'OPTIONS') {
      return new TachyonResponse(204, '')
        .header('Access-Control-Allow-Origin', '*')
        .header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE')
        .header('Access-Control-Allow-Headers', 'Content-Type, Authorization')
    }
  },
  pos: (_req, res) => {
    return res.header('Access-Control-Allow-Origin', '*')
  }
}

const logger: Plugin = {
  pos: (req, res) => {
    console.log(`${req.method} ${req.path} -> ${res.status}`)
  }
}

new Tachyon({ security: 'strict' })
  .use(cors)
  .use(auth)
  .use(logger)
  .get('/api/users', () => new TachyonResponse(200, '[]'))
  .listen(3000)

Configuracao

new Tachyon({
  workers: 4,                    // threads (default: CPU count)
  security: 'basic',            // 'none' | 'basic' | 'strict'
  compressionThreshold: 1024,   // bytes, 0 = tudo, -1 = desabilitado
})

Seguranca

| Preset | Headers | |--------|---------| | none | Nenhum | | basic | X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN | | strict | Todos de basic + X-XSS-Protection, Referrer-Policy, Permissions-Policy, COOP, CORP |

Compressao

Respostas grandes sao comprimidas com gzip automaticamente quando o cliente suporta (Accept-Encoding: gzip).

new Tachyon()                              // default: comprime bodies >= 1KB
new Tachyon({ compressionThreshold: 0 })   // comprime tudo
new Tachyon({ compressionThreshold: 4096 })// comprime bodies >= 4KB
new Tachyon({ compressionThreshold: -1 })  // desabilita compressao

Por que tachyon?

  • Servidor em Rust — loop, parsing HTTP e I/O rodam em Rust com coroutines
  • Parser SIMD — scanning HTTP com SSE4.2/AVX2/NEON, 68-90% mais rapido
  • Zero allocation — buffer pool pre-alocado, zero alloc por request
  • Gzip nativo — compressao transparente no Rust
  • Minimo overhead JS — so o handler do usuario roda em JavaScript

Plataformas

| OS | Arquitetura | |---|---| | Linux | x64 | | macOS | x64, ARM64 | | Windows | x64 |

Licenca

MIT