bun
bun copied to clipboard
Provide a homebrew formula to install Bun
Thanks for creating Bun! This is probably already on your to-do list for later on in your beta or for when you exit your beta, but it would be great to be able to install bun via homebrew, whether that's a tap or a formula in their core repo.
This worked for me (although I only tried the arm version).
class Bun < Formula
desc 'bun CLI'
homepage 'https://bun.sh/'
version '0.1.10'
if Hardware::CPU.arm?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-aarch64.zip"
sha256 'f37a77ed4c503540dcfebbd39261b55c9c5ccc5599d8edcf502752949a4b2dbe'
elsif Hardware::CPU.avx2?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-x64.zip"
sha256 '793ec036acb4a2997aeb1f06c982670f72bb25d94d3f85cca33fef2358d3b541'
else
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-x64-baseline.zip"
sha256 '8dc96c8046127a32da49fc47499cb5cc71bc6bbc9dcc9e0d4eaab7fe0c6f2215'
end
def install
bin.install "bun"
print "Installed to: #{HOMEBREW_PREFIX}/bin/bun\n"
end
end
brew install ./bun.rb
Homebrew support is finally here 🎉
brew tap oven-sh/bun
brew install bun
You can also install a specific release: (versions 0.1.6 and later)
brew install [email protected]
You can look at our Homebrew tap at this repository: oven-sh/homebrew-bun