Skip to content
开发文档
Getting Started

新手上路

¥Getting Started

安装

¥Installation

尝试 SWC 最简单的方法是使用 在线运行

¥The easiest way to try SWC is using the Playground.

否则,运行以下命令来下载预构建的二进制文件:

¥Otherwise, run the following to download pre-built binaries:

pnpm add -D @swc/cli @swc/core

然后,你可以转译第一个文件并发送到 stdout

¥Then, you can transpile your first file and emit to stdout:

npx swc ./file.js

支持的二进制文件

¥Supported Binaries

SWC 可以作为预构建的二进制文件下载和使用,也可以从源代码构建。目前,提供了以下二进制文件:

¥SWC can be downloaded and used as a pre-built binary, or built from source. Currently, the following binaries are provided:

  • Mac (Apple Silicon)

  • Mac (x64)

  • Linux (x86_64)

  • Linux (aarch64)

  • Linux (armv7)

  • Alpine Linux (也安装 @swc/core-linux-musl)

    ¥Alpine Linux (also install @swc/core-linux-musl)

  • Android (aarch64)

  • Windows (win32-x64)

  • Windows (ia32)

Last updated on November 24, 2023