A benchmark suite for evaluating AI code generation on Bun runtime tasks
Project description
Bun-Bench
A benchmark for evaluating LLM coding capabilities on real-world Bun runtime issues
Overview
Bun-Bench is a curated benchmark designed to evaluate Large Language Models (LLMs) on their ability to resolve real-world issues in the Bun JavaScript/TypeScript runtime. Inspired by SWE-bench, Bun-Bench provides a standardized framework for assessing AI coding assistants on tasks ranging from bug fixes to feature implementations.
What is Bun-Bench?
Bun-Bench consists of 100 carefully curated tasks derived from realistic Bun runtime issues, including:
- Bug fixes in core APIs (
Bun.serve(),Bun.file(),fetch(), etc.) - Feature implementations for new Bun APIs
- Database driver issues for PostgreSQL and MySQL
- Build tooling problems with bundling, transpilation, and HMR
- Testing framework issues with
bun test
Each task includes:
- A detailed problem description
- The issue category (Bug Fix or Feature)
- Reproducible test cases
- Expected behavior specifications
Installation
From PyPI (Recommended)
pip install bun-bench
From Source
git clone https://github.com/chittihq/bun-bench.git
cd bun-bench
pip install -e .
Requirements
- Python 3.9+
- Bun runtime (latest version recommended)
- Git
Quick Start
1. Install the package
pip install bun-bench
2. Load the dataset
from bun_bench import BunBench
# Load all tasks
benchmark = BunBench()
# Get a specific task
task = benchmark.get_task(1)
print(task.description)
3. Run evaluation on a model
bun-bench evaluate --model gpt-4 --output results/
4. View results
bun-bench report results/
Dataset Overview
Bun-Bench contains 100 tasks organized across multiple categories:
Categories
| Category | Count | Description |
|---|---|---|
| Core APIs | 25 | Bun.serve(), Bun.file(), Bun.spawn(), etc. |
| Fetch & Network | 12 | HTTP client, WebSocket, DNS |
| SQLite | 8 | bun:sqlite driver issues |
| PostgreSQL | 25 | PostgreSQL driver bugs and features |
| MySQL | 25 | MySQL driver bugs and features |
| Build & Bundle | 10 | bun build, transpilation, HMR |
| Testing | 8 | bun test framework issues |
| Package Manager | 7 | bun install, bun pm |
Difficulty Distribution
| Difficulty | Count | Description |
|---|---|---|
| Easy | 30 | Single-file fixes, clear reproduction steps |
| Medium | 45 | Multi-file changes, moderate complexity |
| Hard | 25 | Complex architectural changes, deep runtime knowledge |
Task Types
- Bug Fix (70 tasks): Resolve existing incorrect behavior
- Feature (30 tasks): Implement new functionality
Running Evaluation
Basic Evaluation
# Evaluate a model on all tasks
bun-bench evaluate --model claude-3-opus --output results/claude-opus/
# Evaluate on specific tasks
bun-bench evaluate --model gpt-4 --tasks 1,2,3,4,5 --output results/gpt4-subset/
# Evaluate on a category
bun-bench evaluate --model claude-3-opus --category postgresql --output results/
Evaluation Options
bun-bench evaluate \
--model <model-name> \ # Required: Model to evaluate
--output <directory> \ # Required: Output directory for results
--tasks <task-ids> \ # Optional: Comma-separated task IDs
--category <category> \ # Optional: Filter by category
--max-iterations <n> \ # Optional: Max attempts per task (default: 3)
--timeout <seconds> \ # Optional: Timeout per task (default: 300)
--parallel <n> # Optional: Parallel task execution
Programmatic Evaluation
from bun_bench import BunBench, Evaluator
benchmark = BunBench()
evaluator = Evaluator(model="claude-3-opus")
# Evaluate single task
result = evaluator.evaluate_task(benchmark.get_task(1))
# Evaluate all tasks
results = evaluator.evaluate_all(benchmark.tasks)
# Generate report
results.to_report("results/report.json")
Submitting Results
Official Leaderboard Submission
To submit your results to the official leaderboard:
-
Run the full benchmark
bun-bench evaluate --model your-model --output results/
-
Validate your results
bun-bench validate results/
-
Generate submission file
bun-bench package results/ --output submission.json
-
Submit via GitHub
- Fork the bun-bench-results repository
- Add your
submission.jsontosubmissions/ - Open a Pull Request with your model details
Submission Requirements
- All 100 tasks must be evaluated
- Results must be reproducible
- Include model configuration details
- Provide inference logs for verification
Leaderboard
| Rank | Model | Resolved | % | Date |
|---|---|---|---|---|
| - | Your model here | - | - | - |
Submit your results to appear on the leaderboard!
Citation
If you use Bun-Bench in your research, please cite:
@misc{bunbench2026,
title={Bun-Bench: A Benchmark for Evaluating LLMs on Bun Runtime Issues},
author={Bun-Bench Contributors},
year={2026},
howpublished={\url{https://github.com/chittihq/bun-bench}}
}
Related Work
Bun-Bench is inspired by and builds upon the methodology of:
- SWE-bench - The original benchmark for evaluating LLMs on real-world software engineering tasks from GitHub issues.
- SWE-bench Lite - A filtered subset of SWE-bench for faster evaluation.
We extend our thanks to the SWE-bench team for pioneering this approach to LLM evaluation.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines on:
- Adding new tasks
- Improving documentation
- Reporting issues
- Submitting fixes
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bun_bench-0.1.0.tar.gz.
File metadata
- Download URL: bun_bench-0.1.0.tar.gz
- Upload date:
- Size: 63.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b51189fcb2eef76e36f8bbf7026a8b1be71fcad2b18a3540196882b79b8a48de
|
|
| MD5 |
bed100de030791e022f8185b441442a7
|
|
| BLAKE2b-256 |
87320cce84f2452f52677295e51fa295f8e1375c02d7fe2e1355b8f1a1296ca8
|
Provenance
The following attestation bundles were made for bun_bench-0.1.0.tar.gz:
Publisher:
publish.yml on chittihq/bun-bench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bun_bench-0.1.0.tar.gz -
Subject digest:
b51189fcb2eef76e36f8bbf7026a8b1be71fcad2b18a3540196882b79b8a48de - Sigstore transparency entry: 918572875
- Sigstore integration time:
-
Permalink:
chittihq/bun-bench@170ac248944db787adf2edb917032f51310e8960 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/chittihq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@170ac248944db787adf2edb917032f51310e8960 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bun_bench-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bun_bench-0.1.0-py3-none-any.whl
- Upload date:
- Size: 55.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
626d81e41a08203f1631712c3e4cf3c857e4684efe918e20fe2ef6f77d3f3432
|
|
| MD5 |
4c8e42daac9ee4198be346111efc5601
|
|
| BLAKE2b-256 |
313c6a84ca032953686717fd65e0ae1517327bc5d59cd6dff904476ac4e529af
|
Provenance
The following attestation bundles were made for bun_bench-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on chittihq/bun-bench
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bun_bench-0.1.0-py3-none-any.whl -
Subject digest:
626d81e41a08203f1631712c3e4cf3c857e4684efe918e20fe2ef6f77d3f3432 - Sigstore transparency entry: 918573122
- Sigstore integration time:
-
Permalink:
chittihq/bun-bench@170ac248944db787adf2edb917032f51310e8960 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/chittihq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@170ac248944db787adf2edb917032f51310e8960 -
Trigger Event:
workflow_dispatch
-
Statement type: