belaustegui

belaustegui

Hi!

Bun is a new all-in-one toolkit for Javascript: bundler, test runner, package manager, dev. environment, etc. It can do what Esbuild does, and more.

I’ve just published a package heavily inspired in the Esbuild integration package made by Wojtek Mach and José Valim that is adapted to install and invoke Bun.

I am using it in a personal project of mine and the switch from Esbuild requires very minimal changes. Then, it allows you to install and the many node packages available without requiring NodeJS or NPM. It also supports TypeScript, JSX, CSS, WASM, and many more (even Rust!).

Anyway. If you want to check it out you can take a look at the GitHub Repo and the Hex.pm package.

Thanks again to @josevalim and @wojtekmach for creating the Esbuild packge :bowing_man: which I used as a base.

Showing Posts 25 to 16

greven

greven

Thanks for your work. I’ve been using it for my personal website and it has been stellar, only thing missing was really figuring out how colocated JS would work, so thanks for that! =)

lud

lud

Hello,

Do you have an example of running JS code from elixir in a safe/sandbox way with bun?

belaustegui

belaustegui OP

I’ve just released a bun 1.6.0 which contains multiple improvements for:

  • Pooling process support – execute JS using Bun with efficient process reuse without the overhead of constantly spawning new processes.
  • Phoenix support – better docs for colocated JS and Hooks in new projects using the latest Phoenix versions.

Check out the GitHub Repo and the Hex.pm package for extra details!

D4no0

D4no0

This is actually extremely nice, because I am tired of always researching a new not “deprecated” way to install node when building release containers.

LostKobrakai

LostKobrakai

bun’s bundler api is heavily inspired by esbuild, but you can read how they differ here: esbuild - Bun

hauleth

hauleth

Bun is full JS runtime, not just bundler. That mean that you can also run NPM packages using Bun, which IIRC is not possible with ESbuild. For example I switched from Tailwind to just PostCSS and I can use “regular” package.json with ease without any additional steps.

D4no0

D4no0

Looks like for phoenix builds bun looks exactly like esbuild, are there any notable differences in this regard?

belaustegui

belaustegui OP

Hi all!

I’ve just released bun 1.3.1 which contains more improvements for process wrapping. Now we just wrap bun build. This allows you to use bun run to call other commands (for example bun run tailwind to build your CSS without using the Elixir Tailwind package).

Thanks @Sgoettschkes for reporting this and following up with a detailed investigation.

Check out the GitHub Repo and the Hex.pm package for the release notes and code.

Happy coding! :hibiscus:

znewbiez1001

znewbiez1001

Oh I see, now it works. Thanks bro!

belaustegui

belaustegui OP

Interesting. Bun supports only Elixir 1.15 and newer versions. In fact it uses Mix.ensure_application!1 which is only available from Elixir 1.15.

Where Next? Top

Trending in Announcing Top

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
CodeSync
:microphone: ElixirConf 2026 - Call for Talks is open! We’re heading to Chicago :united_states: :round_pushpin: In person + virtual :d...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews