In a sense, yes! Here's the difference:
Rust:
Your app as .rs
Windows: compile → app.exe
Linux: compile → app.elf
JS:
Your app as .js
Windows: bun app.js
Linux: bun app.js
You copy & paste the same source code to another platform with Bun already installed, and it just runs. No compilation needed. Think of Bun as a web browser, but with no limitations on what your JavaScript code can do.
My JavaScript stack shares a Bun binary compiled for each platform. But the Bun binary itself is also not small. So the real benefit becomes more apparent as you run more apps on it.
As a JavaScript developer, I never thought I'd run into this:
***GC STUTTER !!!***
Already hitting 30+ FPS, but still getting occasional stutters.
And now I'm manually managing memory and reinventing Rust-style ownership in JavaScript.
What a crazy world 😂😂😂
@RockySaint6611 Cross-platform compatibility
Running the same apps on Linux, Android, Windows, +/- macOS without recompilation
e.g. Running pure QML/Quickshell apps through my JavaScript runtime, without Qt dependencies.
Eventually, a lightweight desktop environment built mostly in JavaScript!
Bun AOT also introduces `--trim` which deletes unused parts of Bun from the compiled binary
On macOS, a binary that uses Bun.serve’s HTTP server goes from 89 MB to 25 MB
I used to think computer science people cared way too much about a few milliseconds
Now writing my own graphics stack in Bun JavaScript, I finally get it 😂
10ms → 20ms = 100 FPS → 50 FPS
WebGL Aquarium:
13 FPS on my 11 y/o Lenovo U41-70
Wonder if Bun AOT can save me 😅
@NixFred I'm building a web browser and extending its capabilities this week.
It can now pretend to be QuickShell.
Runs Flea & Omastorm partially now.
Made Dockerfiles for these 2 to run on Android directly.
bunx buninu-browser
Built with Bun JavaScript +/- Wasm