Files
bun.sh/docs
Sosuke Suzuki 8d8345a114 Implement ESM bytecode cache with module metadata serialization
Add BMES v3 format that stores module metadata (import/export entries,
variable declarations, code features) alongside bytecode. This enables
skipping the parsing phase for ES modules by reconstructing JSModuleRecord
directly from cached metadata.

Key changes:
- Add createModuleRecordFromCache() to reconstruct JSModuleRecord from cache
- Serialize/deserialize module metadata in BMES v3 format
- Add hasCachedModuleMetadata() virtual method to SourceProvider

Performance improvement for large bundles:
- ~200KB: break-even point
- 2MB bundle: +13% faster startup
- 10MB bundle: +11% faster startup
- 20MB bundle: +15% faster startup (65ms saved)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 16:43:02 +09:00
..
2025-11-10 17:38:48 -08:00
2025-11-21 14:22:28 -08:00

Logo

Bun Documentation

Official documentation for Bun: the fast, all-in-one JavaScript runtime.

Development

Install the Mintlify CLI to preview the documentation locally:

bun install -g mint

Run the development server:

mint dev

The site will be available at http://localhost:3000.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.