Bun JavaScript Runtime Adds Runtime Plugin API
Written by Kay Ewbank   
Tuesday, 04 October 2022

Bun, a new JavaScript runtime that has been designed for speed, has been updated with improvements including a plugin API for Bun's runtime, even faster async http server responses, and a more reliable macOS event loop.

Bun is a modern JavaScript runtime aiming at similar uses to Node or Deno. It was built from scratch to focus being fast on startup  and on providing a complete tool including bundler, transpiler and package manager.

bun

The developer of Bun, Jarred Sumner, says it is designed as a drop-in replacement for your current JavaScript and TypeScript apps or scripts, running either on your local computer, server or on the edge.

bun v node and deno

Bun is a wrapper around JavaScriptCore, WebKit's JavaScript engine, and natively implements hundreds of Node.js and Web APIs, including around 90 percent of Node-API functions (native modules), fs, path, and Buffer.

Bun is written in Zig, a low-level programming language with manual memory management. Among the parts of Bun that have been specifically written are clients for NPM, SQLite, HTTP, WebSocket and the JSX/TypeScript transpiler.

The developers say that they've spent their time profiling, benchmarking and optimizing things, and that while the mechanisms vary for different parts of Bun, the one general theme is that Zig's low-level control over memory and lack of hidden control flow makes it much simpler to write fast software.

Sumner says the goal of Bun is to run most of the world's JavaScript outside of browsers - no-one could accuse him of lacking ambition!

The most recent version of Bun, v0.1.11 has a new plugin API for Bun's runtime, and offers two and a half times faster async http server responses. The React SSR on macOS is also twice as fast as in the previous release, and the macOS event loop is more reliable. The final change of note is the extension of support in tsconfig.json.

Bun 0.1.11 is available now.

bun

More Information

Bun Website

Bun On GitHub

Zig Website

Related Articles

Deno Adds API Support For Node.js Compatibility 

Node.js 18 Adds Core Test Runner

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


IBM Updates Granite Models
28/10/2024

IBM has released new Granite models that it says provide state-of-the-art performance relative to model size. The Granite 3.0 collection includes a new, instruction-tuned, dense decoder-only LLM.



Lightbend Announces Akka 3
15/11/2024

Lightbend, the company that developed Akka, has announced Akka 3, and has changed its name to Akka. The company produces cloud-native microservices frameworks, and Akka is used for building distribute [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 29 February 2024 )