# 使用 Homebrew, apk, Nix, scoop 安装 swc

查看 swc 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:swc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install swc
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add swc
```

  证据: Alpine Linux edge package indexes: swc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#swc
```

  证据: nixpkgs package indexes: pkgs/by-name/sw/swc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/swc
```

  证据: Scoop official bucket manifest trees: bucket/swc.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:swc
- **软件包管理器:** Homebrew
- **版本:** 1.15.47
- **来源摘要:** Super-fast Rust-based JavaScript/TypeScript compiler
- **主页:** <https://swc.rs>
- **仓库:** <https://github.com/swc-project/swc>
- **最后更新:** 2026-07-29T16:58:27Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- swc (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.15.47
## 项目历史与用法

SWC, short for Speedy Web Compiler, is a Rust-based JavaScript and TypeScript compiler distributed to JavaScript users through packages such as @swc/core and @swc/cli and to system package users through formulae such as Homebrew's swc. In package-manager culture it is part of the broader move from JavaScript build tools implemented in JavaScript to fast native compilers shipped as prebuilt binaries.

### 项目历史

The project announced SWC 1.0 on February 8, 2019, describing it as a fast JavaScript compiler able to transpile TypeScript, JSX, and modern ECMAScript to browser-compatible JavaScript. The official repository describes SWC as both a Rust and JavaScript library, which explains why it matters to two package ecosystems at once: Rust crates for compiler internals and npm packages for day-to-day web builds.

### 采用历史

The SWC website presents it as used by tools such as Next.js, Parcel, and Deno and by companies including Vercel, ByteDance, Tencent, Shopify, and Trip.com. Its adoption story is closely tied to performance: official documentation compares it with Babel and advertises large single-thread and multi-core speedups, making it attractive in CI, editor, and monorepo workflows where transpilation time is visible.

### 使用方式

CLI users commonly install @swc/cli with @swc/core and run swc over source files, while project-level behavior is configured with .swcrc. The Homebrew package gives non-npm users a direct swc executable, but most web projects still consume SWC through their JavaScript package manager or through higher-level tools that embed it.

### 为什么软件包爱好者会关心

SWC is interesting to package maintainers because it combines native-code speed with the packaging complexity of multi-platform binary distribution. It also turns compiler versioning into dependency graph plumbing: JavaScript packages, Rust crates, WebAssembly plugins, and framework integrations all need to line up well enough that a build tool can be upgraded without surprising users.

### 时间线

- 2019: SWC 1.0 announced as a fast JavaScript compiler.
- 2020: Official SWC/Babel performance comparison published.
- 2025: Official documentation describes SWC as a Rust-based platform used by major tools and companies.

### Related projects

- Babel is the main historical comparison point in SWC's own documentation.
- Next.js, Parcel, and Deno are named by the SWC website as tools that use SWC.
- Rspack, swc-loader, @swc/jest, and SWC WebAssembly plugins are documented as adjacent integrations.

### 来源

- <https://github.com/swc-project/swc>
- <https://swc.rs/>
- <https://swc.rs/blog/perf-swc-vs-babel>
- <https://swc.rs/blog/swc-1>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .swcrc
## 其他软件包管理器记录

- Nix - swc: normalized package name match | nixpkgs package indexes: pkgs/by-name/sw/swc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - swc - 1.15.7-r0: normalized package name match | Alpine Linux edge package indexes: swc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A super-fast TypeScript / JavaScript compiler written in Rust | https://swc.rs
- Scoop - main/swc: normalized package name match | Scoop official bucket manifest trees: bucket/swc.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/swc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/swc.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
