{"id":24987,"library":"bebop-tools","title":"Bebop Tools","description":"bebop-tools is the official CLI compiler for Bebop, a blazing fast, typesafe binary serialization library. Current stable version is 3.2.3. It compiles .bop schema files and generates idiomatic code for TypeScript, C#, Rust, C, and more. Unlike Protocol Buffers or FlatBuffers, Bebop focuses on minimal wire size and zero-copy parsing. Releases are frequent, with active development under the RainwayApp/6over3 organization.","status":"active","version":"3.2.3","language":"javascript","source_language":"en","source_url":"https://github.com/RainwayApp/bebop","tags":["javascript","bebop","binary","serialization","compiler"],"install":[{"cmd":"npm install bebop-tools","lang":"bash","label":"npm"},{"cmd":"yarn add bebop-tools","lang":"bash","label":"yarn"},{"cmd":"pnpm add bebop-tools","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"bebop-tools is ESM-only since v3. Use dynamic import or top-level await in CJS.","wrong":"const BebopCompiler = require('bebop-tools').BebopCompiler","symbol":"BebopCompiler","correct":"import { BebopCompiler } from 'bebop-tools'"},{"note":"compile is a named export, not default.","wrong":"import compile from 'bebop-tools'","symbol":"compile","correct":"import { compile } from 'bebop-tools'"},{"note":"Used for AST node types; exact name is SyntaxKind.","wrong":"import { Syntax } from 'bebop-tools'","symbol":"SyntaxKind","correct":"import { SyntaxKind } from 'bebop-tools'"}],"quickstart":{"code":"import { compile } from 'bebop-tools';\nimport { writeFileSync } from 'fs';\n\nconst schema = `\n  message Person {\n    string name;\n    int32 age;\n  }\n`;\n\nconst result = compile(schema, {\n  language: 'typescript',\n  namespace: 'MyApp'\n});\n\nif (result.success) {\n  writeFileSync('Person.ts', result.code);\n  console.log('Generated TypeScript code');\n} else {\n  console.error(result.errors);\n}","lang":"typescript","description":"Demonstrates compiling a Bebop schema string to TypeScript code using the compile function."},"warnings":[{"fix":"Use 'bebopc' instead of 'beopc'.","message":"beopc CLI renamed to bebopc in v2.0.0.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Use dynamic import() or switch project to ESM (set \"type\": \"module\" in package.json).","message":"ESM-only since v3.0.0 – CommonJS require() no longer works.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Import named exports like { compile, BebopCompiler }.","message":"Default export is not available; only named exports are provided.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Install @bebop/runtime for runtime helpers.","message":"The 'runtime' package is separate and not bundled in bebop-tools.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install bebop-tools'.","cause":"Package not installed.","error":"Error: Cannot find module 'bebop-tools'"},{"fix":"Use 'import { compile } from 'bebop-tools''.","cause":"Incorrect import style (used default instead of named).","error":"TypeError: bebop_tools_1.compile is not a function"},{"fix":"Switch to ESM or use dynamic import().","cause":"Using require() in a CommonJS environment with ESM-only package.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Pass options with { language: 'typescript' }.","cause":"Missing 'language' option in compile() call.","error":"Error: No language specified"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}