Bun (software)

Last updated
Bun
Developer(s) Oven
Stable release
1.0.33 [1]   OOjs UI icon edit-ltr-progressive.svg / 18 March 2024;24 days ago (18 March 2024)
Repository github.com/oven-sh/bun
Written in Zig
Type Runtime environment
License MIT license [2]
Website bun.sh

Bun is a JavaScript runtime, package manager, test runner and bundler built from scratch using the Zig programming language. [3] [4] It was designed by Jarred Sumner as a drop-in replacement for Node.js. Bun uses WebKit's JavaScriptCore as the JavaScript engine, [5] unlike Node.js and Deno, which both use V8.

Contents

It supports bundling, minifying, server-side rendering (Svelte, Nuxt.js, Vite). Bundling refers to the process of combining multiple files and assets like JavaScript, CSS, and HTML into a single file, or a smaller number of files, to reduce the number of server requests and enhance performance. [6] Minifying is a technique of compressing these files by removing unnecessary characters (like whitespace, comments, etc.) without affecting their functionality, further optimizing website loading times. Bun provides an API to decide whether to preserver some readability by e.g. keeping whitespace. [6]

The runtime supports foreign function interface (FFI), SQLite3, TLS 1.3, and DNS resolution. It also comes bundled in with common tools like file editing, HTTP servers, Websocket, and hashing. [7]

Since Bun 1.1 the runtime supports Windows 10 and later (along with Linux and MacOS). [8] [9] It also introduced a cross-platform Bun Shell for running some Bash commands without extra dependencies. [8] [9]

See also

Related Research Articles

<span class="mw-page-title-main">JavaScript</span> High-level programming language

JavaScript, often abbreviated as JS, is a programming language and core technology of the Web, alongside HTML and CSS. 99% of websites use JavaScript on the client side for webpage behavior.

ECMAScript is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is standardized by Ecma International in the document ECMA-262.

A foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written or compiled in another one. An FFI is often used in contexts where calls are made into binary dynamic-link library.

.properties is a file extension for files mainly used in Java-related technologies to store the configurable parameters of an application. They can also be used for storing strings for Internationalization and localization; these are known as Property Resource Bundles.

<span class="mw-page-title-main">Aptana</span> Text editor

Aptana, Inc. is a company that makes web application development tools for use with a variety of programming languages. Aptana's main products include Aptana Studio, Aptana Cloud and Aptana Jaxer.

Svelte is a free and open-source component-based front-end software framework, and language created by Rich Harris and maintained by the Svelte core team members.

<span class="mw-page-title-main">Node.js</span> JavaScript runtime environment

Node.js is a cross-platform, open-source JavaScript runtime environment that can run on Windows, Linux, Unix, macOS, and more. Node.js runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser.

npm JavaScript package manager

npm is a package manager for the JavaScript programming language maintained by Microsoft's npm, Inc. npm is the default package manager for the JavaScript runtime environment Node.js and is included as a recommended feature in the Node.js installer.

<span class="mw-page-title-main">MEAN (solution stack)</span> JavaScript software stack

MEAN is a source-available JavaScript software stack for building dynamic web sites and web applications. A variation known as MERN replaces Angular with React.js front-end, and another named MEVN use Vue.js as front-end.

<span class="mw-page-title-main">OpenFL</span> Software framework for video games

OpenFL is a free and open-source software framework and platform for the creation of multi-platform applications and video games. OpenFL applications can be written in Haxe, JavaScript, or TypeScript, and may be published as standalone applications for several targets including iOS, Android, HTML5, Windows, macOS, Linux, WebAssembly, Flash, AIR, PlayStation 4, PlayStation 3, PlayStation Vita, Xbox One, Wii U, TiVo, Raspberry Pi, and Node.js.

<span class="mw-page-title-main">AWS Lambda</span> Serverless computing platform

AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It is designed to enable developers to run code without provisioning or managing servers. It executes code in response to events and automatically manages the computing resources required by that code. It was introduced on November 13, 2014.

<span class="mw-page-title-main">Webpack</span> Open-source JavaScript module bundler

Webpack is a free and open-source module bundler for JavaScript. It is made primarily for JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the corresponding loaders are included. Webpack takes modules with dependencies and generates static assets representing those modules.

NativeScript is an open-source framework to develop mobile apps on the iOS and Android platforms. It was originally conceived and developed by Progress. At the end of 2019 responsibility for the NativeScript project was taken over by long-time Progress partner, nStudio. In December 2020 nStudio also oversaw the induction of NativeScript into OpenJS Foundation as an Incubating Project. NativeScript apps are built using JavaScript, or by using any programming language that transpiles to JavaScript, such as TypeScript. NativeScript supports the Angular and Vue JavaScript frameworks. Mobile applications built with NativeScript result in fully native apps, which use the same APIs as if they were developed in Xcode or Android Studio. Additionally, software developers can re-purpose third-party libraries from CocoaPods, Maven, and npm.js in their mobile applications without the need for wrappers.

<span class="mw-page-title-main">Angular (web framework)</span> Open source web application framework

Angular is a TypeScript-based, free and open-source single-page web application framework led by the Angular Team at Google and by a community of individuals and corporations. Angular is a complete rewrite from the same team that built AngularJS. Angular ecosystem consists of a diverse group of over 1.7 million developers, library authors, and content creators.

<span class="mw-page-title-main">Enonic XP</span>

Enonic XP is a free and open-source web application platform and content management system (CMS) in one based on Java and Elasticsearch. Developed by the Norwegian software company Enonic, the microservice web platform can be used to build progressive web applications, Next.js websites, or web-based APIs. Enonic XP uses an application framework for coding server logic with JavaScript, and has no need for SQL as it ships with an integrated content repository. The CMS is fully decoupled, meaning developers can create traditional websites and landing pages, or use XP in headless mode, that is without the presentation layer, for loading editorial content onto any device or client. Enonic is used by major organizations in Norway, including the national postal service Norway Post, the insurance company Gjensidige, the national lottery Norsk Tipping, the Norwegian Labour and Welfare Administration, and all the top football clubs in the national football league for men, Eliteserien.

Next.js is an open-source web development framework created by the private company Vercel providing React-based web applications with server-side rendering and static website generation.

<span class="mw-page-title-main">Deno (software)</span> Secure JavaScript and TypeScript runtime

Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.

esbuild is a free and open-source module bundler and minifier for JavaScript written by Evan Wallace. Written in Go instead of JavaScript, esbuild claims to be "10 to 100 times" faster than other bundlers by using parallelism and shared memory usage. It supports TypeScript, JSX, tree-shaking and is extensible through plugins.

References

  1. "Release 1.0.33". 18 March 2024. Retrieved 21 March 2024.
  2. Sumner, Jarred (2023-07-02). "License". Bun Docs. Retrieved 2023-07-07.
  3. "What is Bun? | Bun Docs". Bun. Retrieved 2024-04-01.
  4. Tyson, Matthew (February 23, 2023). "Explore Bun.js: The all-in-one JavaScript runtime". InfoWorld. Retrieved October 11, 2023.
  5. Omolana, Timilehin (2022-08-02). "What Is Bun.js and Why Is the JavaScript Community Excited About It?". makeuseof.com. Retrieved 2023-05-30.
  6. 1 2 "The Bun Bundler". Bun. 2023-05-16. Retrieved 2024-04-03.
  7. "Bun APIs". Bun Docs. Retrieved September 11, 2023.
  8. 1 2 "Bun 1.1". Bun. 2024-04-01. Retrieved 2024-04-03.
  9. 1 2 Anderson, Tim (2024-04-02). "Bun 1.1 released with Windows support, stable WebSocket client and more • DEVCLASS". DEVCLASS. Retrieved 2024-04-03.