bun
所属分类:其他
开发工具:Zig
文件大小:92446KB
下载次数:0
上传日期:2023-06-21 20:27:44
上 传 者:
sh-1993
说明: 令人难以置信的快速JavaScript运行时、绑定器、测试运行器和包管理器–一体式
(Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one)
文件列表:
.docker (0, 2023-11-10)
.docker\chrome.json (28719, 2023-11-10)
.docker\chromium.pref (322, 2023-11-10)
.docker\copy-bun-binary.sh (213, 2023-11-10)
.docker\debian.list (162, 2023-11-10)
.docker\dockerfile-common.sh (752, 2023-11-10)
.docker\pull.sh (464, 2023-11-10)
.docker\run-dockerfile.sh (1177, 2023-11-10)
.docker\run-test.sh (133, 2023-11-10)
.docker\runner.sh (224, 2023-11-10)
.docker\unit-tests.sh (195, 2023-11-10)
.dockerignore (199, 2023-11-10)
.editorconfig (137, 2023-11-10)
.prettierignore (258, 2023-11-10)
.prettierrc.cjs (239, 2023-11-10)
.vscode (0, 2023-11-10)
.vscode\c_cpp_properties.json (4933, 2023-11-10)
... ...
Bun
### [Read the docs →](https://bun.sh/docs)
## What is Bun?
> **Bun is under active development.** Use it to speed up your development workflows or run simpler production code in resource-constrained environments like serverless functions. We're working on more complete Node.js compatibility and integration with existing frameworks. Join the [Discord](https://bun.sh/discord) and watch the [GitHub repository](https://github.com/oven-sh/bun) to keep tabs on future releases.
Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable called `bun`.
At its core is the _Bun runtime_, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It's written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.
```bash
bun run index.tsx # TS and JSX supported out-of-the-box
```
The `bun` command-line tool also implements a test runner, script runner, and Node.js-compatible package manager. Instead of 1,000 node_modules for development, you only need `bun`. Bun's built-in tools are significantly faster than existing options and usable in existing Node.js projects with little to no changes.
```bash
bun test # run tests
bun run start # run the `start` script in `package.json`
bun install
# install a package
bunx cowsay 'Hello, world!' # execute a package
```
## Install
Bun supports Linux (x*** & arm***) and macOS (x*** & Apple Silicon).
> **Linux users** — Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1.
>
> **Windows users** — Bun does not currently provide a native Windows build. We're working on this; progress can be tracked at [this issue](https://github.com/oven-sh/bun/issues/43). In the meantime, use one of the installation methods below for Windows Subsystem for Linux.
```sh
# with install script (recommended)
curl -fsSL https://bun.sh/install | bash
# with npm
npm install -g bun
# with Homebrew
brew tap oven-sh/bun
brew install bun
# with Docker
docker pull oven/bun
docker run --rm --init --ulimit memlock=-1:-1 oven/bun
```
### Upgrade
To upgrade to the latest version of Bun, run:
```sh
bun upgrade
```
Bun automatically releases a canary build on every commit to `main`. To upgrade to the latest canary build, run:
```sh
bun upgrade --canary
```
[View canary build](https://github.com/oven-sh/bun/releases/tag/canary)
## Quick links
- Intro
- [What is Bun?](https://bun.sh/docs/index)
- [Installation](https://bun.sh/docs/installation)
- [Quickstart](https://bun.sh/docs/quickstart)
- CLI
- [`bun run`](https://bun.sh/docs/cli/run)
- [`bun install`](https://bun.sh/docs/cli/install)
- [`bun test`](https://bun.sh/docs/cli/test)
- [`bun init`](https://bun.sh/docs/cli/init)
- [`bun create`](https://bun.sh/docs/cli/bun-create)
- [`bunx`](https://bun.sh/docs/cli/bunx)
- Runtime
- [Runtime](https://bun.sh/docs/runtime/index)
- [Module resolution](https://bun.sh/docs/runtime/modules)
- [Hot & live reloading](https://bun.sh/docs/runtime/hot)
- [Plugins](https://bun.sh/docs/bundler/plugins)
- Ecosystem
- [Node.js](https://bun.sh/docs/ecosystem/nodejs)
- [TypeScript](https://bun.sh/docs/ecosystem/typescript)
- [React](https://bun.sh/docs/ecosystem/react)
- [Elysia](https://bun.sh/docs/ecosystem/elysia)
- [Hono](https://bun.sh/docs/ecosystem/hono)
- [Express](https://bun.sh/docs/ecosystem/express)
- [awesome-bun](https://github.com/apvarun/awesome-bun)
- API
- [HTTP](https://bun.sh/docs/api/http)
- [WebSockets](https://bun.sh/docs/api/websockets)
- [TCP Sockets](https://bun.sh/docs/api/tcp)
- [File I/O](https://bun.sh/docs/api/file-io)
- [SQLite](https://bun.sh/docs/api/sqlite)
- [FileSystemRouter](https://bun.sh/docs/api/file-system-router)
- [Globals](https://bun.sh/docs/api/globals)
- [Spawn](https://bun.sh/docs/api/spawn)
- [Transpiler](https://bun.sh/docs/api/transpiler)
- [Console](https://bun.sh/docs/api/console)
- [FFI](https://bun.sh/docs/api/ffi)
- [HTMLRewriter](https://bun.sh/docs/api/html-rewriter)
- [Testing](https://bun.sh/docs/api/test)
- [Utils](https://bun.sh/docs/api/utils)
- [Node-API](https://bun.sh/docs/api/node-api)
## Contributing
Refer to the [Project > Development](https://bun.sh/docs/project/development) guide to start contributing to Bun.
## License
Refer to the [Project > License](https://bun.sh/docs/project/licensing) page for information about Bun's licensing.
近期下载者:
相关文件:
收藏者: