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/
Audio
https://dts.podtrac.com/redirect.mp3/audio.rustacean-station.org/file/rustacean-station/2025-05-31-dongyoon-kang.mp3
JSON
/v1/public/podcasts/rustacean-station/episodes/swc-with-dongyoon-kang
Markdown
/podcast/rustacean-station/swc-with-dongyoon-kang.md

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. 1:00 Using 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. 2:40 The Motivation: Eliminating Latency: DongYoon Kang describes the frustration of waiting for HMR updates and the decision to build a faster alternative in Rust.
  3. 6:15 The Rise of SWC and Deno: A look at the early years of SWC and how adoption by projects like Deno drove significant community contributions.
  4. 9:45 Implementing Parsers and Lexers: Insights into the technical challenges of writing a high-performance parser by referencing the Babel source code.
  5. 11:40 Optimization and Community Contribution: How the project manages performance profiling and coordinates a global, asynchronous team of contributors.
  6. 21:20 The Challenges of Language Expansion: Why the creator decided against adding Dart support due to the high cost of maintaining new AST structures.
  7. 23:05 Future Plans: Cross-Module Optimization: A glimpse into upcoming features, including a new module designed for smart, automated code optimizations.