Skip to main content
Home

Built and signed on GitHub Actions

The TypeScript runtime for Bebop, a schema-based binary serialization format.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a year ago (3.1.3)

Bebop TypeScript Runtime

npm version npm downloads GitHub license

The official Bebop runtime for TypeScript and JavaScript.

Overview

This package provides the essential runtime components for using Bebop-generated code in TypeScript and JavaScript projects. It enables blazing fast, typesafe binary serialization with minimal overhead.

Features

  • 🚀 High-performance binary serialization
  • 📦 Tiny runtime footprint
  • 🔒 Type-safe operations
  • 🌐 Works everywhere: Node.js, browsers, serverless platforms, and more
  • 🍃 Zero dependencies
  • 🏋️ Lightweight - minimal impact on your bundle size
  • 🧰 Provides runtime types for enhanced type safety
  • 🔧 Supports dynamic encoding/decoding with binary schemas

Installation

npm install bebop

Usage

While the Bebop TypeScript runtime is primarily used with code generated by bebopc, it also provides useful types and utilities for direct use in your code.

Example usage with generated code:

import { Person } from './generated/schema';

const person = new Person({
    name: "Spike Spiegel",
    age: 27
});

// Encode to binary
const encoded = person.encode();

// Decode from binary
const decoded = Person.decode(encoded);

For more advanced use cases, such as dynamic encoding/decoding with binary schemas, refer to our Binary Schema documentation.

Documentation

For comprehensive documentation and guides, visit:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Bebop is open-source software licensed under the Apache License.

For more information about Bebop, visit bebop.sh.

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@betwixtlabs/bebop

Import symbol

import * as bebop from "@betwixtlabs/bebop";
or

Import directly with a jsr specifier

import * as bebop from "jsr:@betwixtlabs/bebop";

Add Package

pnpm i jsr:@betwixtlabs/bebop
or (using pnpm 10.8 or older)
pnpm dlx jsr add @betwixtlabs/bebop

Import symbol

import * as bebop from "@betwixtlabs/bebop";

Add Package

yarn add jsr:@betwixtlabs/bebop
or (using Yarn 4.8 or older)
yarn dlx jsr add @betwixtlabs/bebop

Import symbol

import * as bebop from "@betwixtlabs/bebop";

Add Package

vlt install jsr:@betwixtlabs/bebop

Import symbol

import * as bebop from "@betwixtlabs/bebop";

Add Package

npx jsr add @betwixtlabs/bebop

Import symbol

import * as bebop from "@betwixtlabs/bebop";

Add Package

bunx jsr add @betwixtlabs/bebop

Import symbol

import * as bebop from "@betwixtlabs/bebop";