swc-project / swc
swc-project / swc
Make the web (development) faster. SWC (stands for Speedy Web Compiler) is a super-fast TypeScript / JavaScript compiler written in Rust. It’s a library for Rust and JavaScript at the same time. 让 Web(开发)变得更快。SWC(Speedy Web Compiler 的缩写)是一个用 Rust 编写的超快速 TypeScript / JavaScript 编译器。它同时也是 Rust 和 JavaScript 的库。
If you are using SWC from Rust, see rustdoc and for most users, your entry point for using the library will be parser. Also, SWC tries to ensure that If you select the latest version of each crates, it will work for rust users. MSRV of crates is currently 1.73. 如果您在 Rust 中使用 SWC,请参阅 rustdoc;对于大多数用户而言,使用该库的入口点将是 parser。此外,SWC 致力于确保用户在选择每个 crate 的最新版本时,它们能够正常工作。目前 crate 的 MSRV(最小支持 Rust 版本)为 1.73。
To update all SWC crates you use, you can run curl https://raw.githubusercontent.com/swc-project/swc/main/scripts/update-all-swc-crates.sh | bash -s. This script will update all dependencies to the latest version and run cargo build to ensure that everything works. Note that you need jq and cargo-upgrade command to run the script.
要更新您使用的所有 SWC crate,您可以运行 curl https://raw.githubusercontent.com/swc-project/swc/main/scripts/update-all-swc-crates.sh | bash -s。该脚本会将所有依赖项更新到最新版本,并运行 cargo build 以确保一切正常。请注意,运行此脚本需要安装 jq 和 cargo-upgrade 命令。
Supported Node Versions: Node v10+ for usage, Node v20+ for development. If you are using SWC from JavaScript, please refer to docs on the website. 支持的 Node 版本:使用时需 Node v10+,开发时需 Node v20+。如果您在 JavaScript 中使用 SWC,请参阅网站上的文档。
Documentation: Check out the documentation in the website. 文档:请查看网站上的文档。
Features: Please see comparison with babel. 特性:请参阅与 Babel 的对比。
Performance: Please see benchmark results on the website. 性能:请参阅网站上的基准测试结果。
Supporting development: SWC is a community-driven project, and is maintained by a group of volunteers. If you’d like to help support the future of the project, please consider: Giving developer time on the project (Message us on Discord (preferred) or Github discussions for guidance!) or Giving funds by becoming a sponsor (see https://opencollective.com/swc)! 支持开发:SWC 是一个社区驱动的项目,由一群志愿者维护。如果您想帮助支持该项目的未来,请考虑:投入开发时间(请通过 Discord(首选)或 Github Discussions 给我们留言以获取指导!)或通过成为赞助商提供资金(请参阅 https://opencollective.com/swc)!
Contributing: See CONTRIBUTING.md. You may also find the architecture documentation useful (ARCHITECTURE.md). 贡献:请参阅 CONTRIBUTING.md。您可能还会发现架构文档(ARCHITECTURE.md)很有用。
License: SWC is primarily distributed under the terms of the Apache License (Version 2.0). See LICENSE for details. 许可证:SWC 主要根据 Apache License (Version 2.0) 的条款进行分发。详情请参阅 LICENSE。