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

@ereo/runtime-bun

v0.2.13

Published

Bun runtime adapter for the EreoJS framework. This is the default runtime, optimized for Bun's exceptional performance and built-in features.

Readme

@ereo/runtime-bun

Bun runtime adapter for the EreoJS framework. This is the default runtime, optimized for Bun's exceptional performance and built-in features.

Installation

bun add @ereo/runtime-bun

Quick Start

import { createBunRuntime, serve } from '@ereo/runtime-bun';

// Quick start with defaults
const runtime = await serve({
  server: { port: 3000 },
});

// Or with more control
const runtime = createBunRuntime({
  server: {
    port: 3000,
    hostname: 'localhost',
  },
  config: {
    // Framework configuration
  },
});

runtime.use(myPlugin);
await runtime.start();

API

createBunRuntime(options?)

Create a new Bun runtime instance.

const runtime = createBunRuntime({
  server: { port: 3000 },
  config: { /* EreoJS config */ },
});

serve(options?)

Quick start helper that creates and starts the runtime.

const runtime = await serve({ server: { port: 3000 } });

Runtime Methods

const runtime = createBunRuntime({ server: { port: 3000 } });

// Register plugins
runtime.use(myPlugin);

// Start the server
const server = await runtime.start();

// Handle requests directly (useful for testing)
const response = await runtime.handle(new Request('http://localhost/api/health'));

// Stop the server
runtime.stop();

Bun-Specific Utilities

The package includes optimized utilities that leverage Bun's built-in features:

import {
  readFile,
  writeFile,
  readJSON,
  gzip,
  gunzip,
  hashPassword,
  verifyPassword,
  randomUUID,
  sleep,
  spawn,
  env,
  requireEnv,
  getDatabase,
} from '@ereo/runtime-bun';

// File operations
const content = await readFile('./data.txt');
await writeFile('./output.txt', content);
const config = await readJSON('./config.json');

// Compression
const compressed = gzip('Hello World');
const decompressed = gunzip(compressed);

// Password hashing
const hash = await hashPassword('secret');
const valid = await verifyPassword('secret', hash);

// Environment variables
const apiKey = env('API_KEY', 'default');
const dbUrl = requireEnv('DATABASE_URL'); // throws if missing

// SQLite database
const db = await getDatabase('./app.db');

Key Features

  • Native Bun server integration
  • Optimized file I/O with Bun.file
  • Built-in gzip compression
  • Secure password hashing with Bun.password
  • SQLite database support via bun:sqlite
  • Environment variable helpers
  • Process spawning utilities

Documentation

For full documentation, visit https://ereojs.github.io/ereoJS/api/runtime-bun/

Part of EreoJS

This package is part of the EreoJS monorepo.

License

MIT