Skip to content

feat(build)!: migrate to Bun and add standalone binary compilation - #10

Merged
gustavovalverde merged 4 commits into
mainfrom
feat/migrate-to-bun
Oct 6, 2025
Merged

gustavovalverde merged 4 commits into
mainfrom
feat/migrate-to-bun

Conversation

@gustavovalverde

Copy link
Copy Markdown
Owner

BREAKING CHANGES:

  • Package is now ESM-only (removed CommonJS builds)
  • Development requires Bun 1.2+ instead of pnpm
  • Node.js 22+ still supported for runtime consumption

Features:

  • Add standalone binary compilation with Bun's --compile flag
    • Support for linux-x64, linux-arm64, darwin-x64, darwin-arm64, windows-x64
    • Baseline and modern CPU variants (Haswell/AVX2+)
    • New GitHub workflow for automated binary builds on releases
    • Binary build script with cross-platform support
  • Maintain Node.js compatibility with runtime detection for Bun.CryptoHasher

Build System:

  • Replace tsup with Bun.build() for faster builds (~0.6s vs 1.5s)
  • Simplify package exports to ESM default only
  • Update all 30+ benchmark scripts to use Bun
  • Remove pnpm workspace configuration

CI/CD:

  • Update all GitHub workflows to use Bun
  • Add build-binaries.yml workflow with artifact publishing
  • Use SHA-pinned GitHub Actions for security
  • Configure proper permissions and credential handling

Development:

  • Replace pnpm scripts with Bun equivalents
  • Update Husky hooks for Bun compatibility
  • Simplify build configuration with fewer dependencies
  • Maintain compatibility with Node.js 22+ runtime

BREAKING CHANGES:
- Package is now ESM-only (removed CommonJS builds)
- Development requires Bun 1.2+ instead of pnpm
- Node.js 22+ still supported for runtime consumption

Features:
- Add standalone binary compilation with Bun's --compile flag
  - Support for linux-x64, linux-arm64, darwin-x64, darwin-arm64, windows-x64
  - Baseline and modern CPU variants (Haswell/AVX2+)
  - New GitHub workflow for automated binary builds on releases
  - Binary build script with cross-platform support
- Maintain Node.js compatibility with runtime detection for Bun.CryptoHasher

Build System:
- Replace tsup with Bun.build() for faster builds (~0.6s vs 1.5s)
- Simplify package exports to ESM default only
- Update all 30+ benchmark scripts to use Bun
- Remove pnpm workspace configuration

CI/CD:
- Update all GitHub workflows to use Bun
- Add build-binaries.yml workflow with artifact publishing
- Use SHA-pinned GitHub Actions for security
- Configure proper permissions and credential handling

Development:
- Replace pnpm scripts with Bun equivalents
- Update Husky hooks for Bun compatibility
- Simplify build configuration with fewer dependencies
- Maintain compatibility with Node.js 22+ runtime
Comment thread .github/workflows/performance-regression.yml Fixed
Comment thread .github/workflows/performance-regression.yml Fixed
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/test.yml Fixed
@gustavovalverde
gustavovalverde merged commit 92468f7 into main Oct 6, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants