![]() To install Bun, run this install script in your terminal. The answer is different for every part of Bun, but one general theme: Zig 's low-level control over memory and lack of hidden control flow makes it much simpler to write fast software. An enormous amount of time spent profiling, benchmarking and optimizing things. Most of Bun is written from scratch including the JSX/TypeScript transpiler, npm client, bundler, SQLite client, HTTP client, WebSocket client and more. ![]() Bun is written in Zig, a low-level programming language with manual memory management. Supports a growing list of Node.js core modules like node:fs and node:path, along with globals like Buffer and process.īun uses the JavaScriptCore engine, which tends to start and perform a little faster than more traditional choices like V8.Provides a low-overhead foreign function interface bun:ffi for calling native code from JavaScript. Rune.js is a JavaScript library for programming graphic design systems with SVG in both the browser or node.js.Implements most of Node-API so many native Node.js modules just work.Ships with a fast SQLite3 client built-in bun:sqlite.env files automatically-no more require("dotenv").config(). Uses the fastest system calls available with Bun.write to write, copy, pipe, send, and clone files.Exposes Bun.Transpiler-Bun's JSX & TypeScript transpiler-as an API.Supports "paths", "jsxImportSource" and more from tsconfig.json files.Transpiles every file, so TypeScript and JSX just work.Both ESM and CommonJS are supported internally Bun uses ESM. Implements Node's node_modules resolution algorithm, so you can use npm packages in Bun.Implements Web APIs like fetch WebSocket and ReadableStream.The goal of Bun is to run most of the world's JavaScript outside of browsers, bringing performance and complexity enhancements to your future infrastructure, as well as developer productivity through better, simpler tooling. Bun natively implements hundreds of Node.js and Web APIs, including ~90% of Node-API functions (native modules), fs, path, Buffer and more. ![]() The picture below shows the result of running node index. Once inside the terminal, you can then run the code using node nameoffile.js command. Use it to run your current JavaScript & TypeScript apps or scripts - on your local computer, server or on the edge. To run the file, you first need to open the integrated VSCode terminal in View > Terminal menu command: Opening VSCode terminal. Bun is a complete toolkit for building JavaScript apps, including a bundler, transpiler, and package manager.īun is designed as a drop-in replacement for Node.js. Bun extends JavaScriptCore, the performance-minded JS engine built for Safari. In edge computing environments, reducing cold start times is critical. Bun is a new JavaScript runtime built from scratch to serve the modern JavaScript ecosystem, with three major design goals:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |