By Muhammediqbal P— A Technophile .
Unlike Deno, Bun is intended to be a drop-in replacement for Node, Webpack, Babel, Yarn, and Post CSS — all in one neat package.https://gist.github.com/ikku47/4a1e22b8d64bb6ce784005cc92c65d6f#file-deno-node-bun
.toml, and CSS support (no extra loaders required).
The Bun is written from scratch including the JSX/TypeScript transpiler, npm client, bundler, SQLite client, HTTP client, WebSocket client, and more.
Supports: macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux (WSL)
curl -fsSL https://bun.sh/install | bash
2. Now it’s Hello World time 😊, Create an http.js file in your project folder:https://gist.github.com/ikku47/fedfa07d0f4d2cfde16a4133e525c6ac#file-bun-hello-word-js
3. Now let’s run it :
bun run http.js
That’s it, you have your first Bun project ready to go.
4. Shall we try a react project now, let’s add react and react-dom to set it up.
bun add react react-domhttps://gist.github.com/ikku47/828e1071d4d53331a2dc60b9cc7a1639#file-bun-react-js
Now you have your react project using Bun.
5. Now let’s try to print the contents of a filehttps://gist.github.com/ikku47/409f6a2db25abee6de885e14e09e7d31#file-bun-cat-js
If you need more examples, have a look at this one.
Is it as fast as it claims to be? Let’s look at some benchmark results.
You can have more bench-marking and detailed reports on this blog by
Jose Granja on this medium article.
We at CaratLane are solving some of the most intriguing challenges to make our mark in the relatively uncharted omnichannel jewellery industry. If you are interested in tackling such obstacles, feel free to drop your updated resume/CV to firstname.lastname@example.org!