From 80dc9b97f2d528ccabdf62b045f5b651e376556b Mon Sep 17 00:00:00 2001 From: Snazzah Date: Fri, 8 Jul 2022 02:06:54 -0500 Subject: [PATCH] chore(landing): build changes --- packages/bun-landing/public/index.css | 2 +- packages/bun-landing/public/index.html | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/bun-landing/public/index.css b/packages/bun-landing/public/index.css index 228503ca6b..bc28c45f0f 100644 --- a/packages/bun-landing/public/index.css +++ b/packages/bun-landing/public/index.css @@ -458,7 +458,7 @@ header { .BarGraphItem--bun .BarGraphBar { background-color: rgb(249, 241, 225); box-shadow: inset 1px 1px 3px rgb(204, 198, 187); - background-image: url("/logo.png"); + background-image: url("/logo.svg"); background-repeat: no-repeat; background-size: 56px 48.8px; background-position: 6px 20%; diff --git a/packages/bun-landing/public/index.html b/packages/bun-landing/public/index.html index 150b988c2d..1fe7d08aaf 100644 --- a/packages/bun-landing/public/index.html +++ b/packages/bun-landing/public/index.html @@ -2,7 +2,11 @@ projects – all in Bun. Bun is a new JavaScript runtime with - a native bundler, transpiler, task runner and npm client built-in."/>Bun is a fast all-in-one JavaScript runtime
Bun

Bun is a fast all-in-one JavaScript runtime

Bundle, transpile, install and run JavaScript & TypeScript projects — all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and npm client built-in.

Install Bun CLI v0.1.0 (beta)
macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux
curl https://bun.sh/install | bash
Show script source

Server-side rendering React

HTTP requests per second (Linux AMD64)

  • bun: 48,936 requests per second
  • node: 16,288 requests per second
  • deno: 15,786 requests per second

Load a huge table

Average queries per second

  • bun: 60.24 queries per second
  • better-sqlite3: 23.28 queries per second
  • deno: 9.55 queries per second

How fast can it get?

Operations per second

  • bun: 115,473,441 operations per second
  • Node-API: 43,478,261 operations per second
  • deno: 2,891,761 operations per iteration
Install Bun CLI v0.1.0 (beta)
macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux
curl https://bun.sh/install | bash
Show script source

Tell me more about Bun

Bun is a modern JavaScript runtime like Node or Deno. It was built from scratch to focus on three main things:

  • Start fast (it has the edge in mind).
  • New levels of performance (extending JavaScriptCore, the engine).
  • Being a great and complete tool (bundler, transpiler, package manager).

Bun is designed as a drop-in replacement for your current JavaScript & TypeScript apps or scripts — on your local computer, server or on the edge. Bun natively implements hundreds of Node.js and Web APIs, including ~90% of Node-API functions (native modules), fs, path, Buffer and more.

The goal of Bun is to run most of the worlds JavaScript outside of browsers, bringing performance and complexity enhancements to your future infrastructure, as well as developer productivity through better, simpler tooling.

Batteries included

  • Web APIs like fetch, WebSocket, and ReadableStream are builtin
  • node_modules bun implements Node.js' module resolution algorithm, so you can use npm packages in bun.js. ESM and CommonJS are supported, but Bun internally uses ESM.
  • In bun.js, every file is transpiled. TypeScript & JSX just work.
  • bun supports "paths", "jsxImportSource"and more from tsconfig.json files
  • Bun.Transpiler bun's JSX & TypeScript transpiler is available as an API in Bun.js
  • use the fastest system calls available with Bun.write to write, copy, pipe, send and clone files.
  • bun.js automatically loads environment variables from .env files. No more require("dotenv").load()
  • bun ships with a fast SQLite3 client builtin bun:sqlite
  • Node-API bun.js implements most of Node-API (N-API). Many Node.js native modules just work.
  • bun:ffi call native code from JavaScript with bun's low-overhead foreign function interface
  • node:fs node:path bun.js natively supports a growing list of Node.js core modules along with globals like Buffer and process.

How does Bun work?

Bun.js uses the JavaScriptCore engine, which tends to start and perform a little faster than more traditional choices like V8. Bun is written in Zig
Bun

Bun is a fast all-in-one JavaScript runtime

Bundle, transpile, install and run JavaScript & TypeScript projects — all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and npm client built-in.

Install Bun CLI v0.1.0 (beta)
macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux
curl https://bun.sh/install | bash
Show script source

Server-side rendering React

HTTP requests per second (Linux AMD64)

  • bun: 48,936 requests per second
  • node: 16,288 requests per second
  • deno: 15,786 requests per second

Load a huge table

Average queries per second

  • bun: 60.24 queries per second
  • better-sqlite3: 23.28 queries per second
  • deno: 9.55 queries per second

How fast can it get?

Operations per second

  • bun: 115,473,441 operations per second
  • Node-API: 43,478,261 operations per second
  • deno: 2,891,761 operations per iteration
Install Bun CLI v0.1.0 (beta)
macOS x64 & Silicon, Linux x64, Windows Subsystem for Linux
curl https://bun.sh/install | bash
Show script source

Tell me more about Bun

Bun is a modern JavaScript runtime like Node or Deno. It was built from scratch to focus on three main things:

  • Start fast (it has the edge in mind).
  • New levels of performance (extending JavaScriptCore, the engine).
  • Being a great and complete tool (bundler, transpiler, package manager).

Bun is designed as a drop-in replacement for your current JavaScript & TypeScript apps or scripts — on your local computer, server or on the edge. Bun natively implements hundreds of Node.js and Web APIs, including ~90% of Node-API functions (native modules), fs, path, Buffer and more.

The goal of Bun is to run most of the worlds JavaScript outside of browsers, bringing performance and complexity enhancements to your future infrastructure, as well as developer productivity through better, simpler tooling.

Batteries included

  • Web APIs like fetch, WebSocket, and ReadableStream are builtin
  • node_modules bun implements Node.js' module resolution algorithm, so you can use npm packages in bun.js. ESM and CommonJS are supported, but Bun internally uses ESM.
  • In bun.js, every file is transpiled. TypeScript & JSX just work.
  • bun supports "paths", "jsxImportSource"and more from tsconfig.json files
  • Bun.Transpiler bun's JSX & TypeScript transpiler is available as an API in Bun.js
  • use the fastest system calls available with Bun.write to write, copy, pipe, send and clone files.
  • bun.js automatically loads environment variables from .env files. No more require("dotenv").load()
  • bun ships with a fast SQLite3 client builtin bun:sqlite
  • Node-API bun.js implements most of Node-API (N-API). Many Node.js native modules just work.
  • bun:ffi call native code from JavaScript with bun's low-overhead foreign function interface
  • node:fs node:path bun.js natively supports a growing list of Node.js core modules along with globals like Buffer and process.

How does Bun work?

Bun.js uses the JavaScriptCore engine, which tends to start and perform a little faster than more traditional choices like V8. Bun is written in Zig, a low-level programming language with manual memory management.

Most of Bun is written from scratch including the JSX/TypeScript transpiler, npm client, bundler, SQLite client, HTTP client, WebSocket client and more.

Why is Bun fast?

An enormous amount of time spent profiling, benchmarking and optimizing things. 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. Sponsor the Zig Software Foundation

Getting started

To install bun, run this install script in your terminal. It downloads Bun from GitHub.

curl https://bun.sh/install | bash

Bun's HTTP server is built on web standards like Request and Response

// http.js
+			c5.7,0,12.8-2.3,19-5.5L394,106z">'s low-level control over memory and lack of hidden control flow makes it much simpler to write fast software. Sponsor the Zig Software Foundation

Getting started

To install bun, run this install script in your terminal. It downloads Bun from GitHub.

curl https://bun.sh/install | bash

Bun's HTTP server is built on web standards like Request and Response

// http.js
 
 export default {