Episode
SWC with DongYoon Kang
- Podcast
- Rustacean Station
- Published
- May 31, 2025
- Duration seconds
- 1490
- Processing state
processed- Canonical source
- https://rustacean-station.org/episode/dongyoon-kang/
Actions
POST https://stenobird.com/v1/public/podcasts/rustacean-station/episodes/swc-with-dongyoon-kang/transcription-requests
Idempotently request low-priority transcript generation for this episode.GET https://stenobird.com/podcast/rustacean-station/swc-with-dongyoon-kang.md
Read the agent-friendly Markdown representation of this episode resource.
Summary
DongYoon Kang, the creator of SWC, explains how he built a high-performance Rust-based web compiler to solve the latency issues inherent in JavaScript-based tools like Babel. The discussion covers the technical transition from single-threaded JavaScript to parallelized Rust and the evolution of SWC into a core dependency for Next.js and Deno.
Topics
- SWC
- Rust
- Web Development
- Compiler Design
- AST
- Performance Optimization
- JavaScript Tooling
- Open Source Maintenance
Highlights
- Main idea: SWC was born from the need to eliminate the multi-second delays in web development caused by the single-threaded nature of JavaScript-based compilers
- Technical approach: The project leverages Rust's ability to perform heavy parallel processing, overcoming the fundamental event-loop limitations of Babel
- Practical takeaway: Building complex parsers can be achieved by studying existing implementations like Babel and porting core logic to Rust
- Failure mode: Expanding the compiler to support new languages like Dart is often limited by the maintenance burden of managing complex AST definitions
- Future direction: The development of a cross-module optimizer to automate sophisticated code optimizations within the compiler
Chapters
1:00Using SWC AST for GraphQL: The host shares a personal experience using SWC's AST to automate the generation of TypeScript files from GraphQL schemas.2:40The Motivation: Eliminating Latency: DongYoon Kang describes the frustration of waiting for HMR updates and the decision to build a faster alternative in Rust.6:15The Rise of SWC and Deno: A look at the early years of SWC and how adoption by projects like Deno drove significant community contributions.9:45Implementing Parsers and Lexers: Insights into the technical challenges of writing a high-performance parser by referencing the Babel source code.11:40Optimization and Community Contribution: How the project manages performance profiling and coordinates a global, asynchronous team of contributors.21:20The Challenges of Language Expansion: Why the creator decided against adding Dart support due to the high cost of maintaining new AST structures.23:05Future Plans: Cross-Module Optimization: A glimpse into upcoming features, including a new module designed for smart, automated code optimizations.