$ account scala-js
Scala.js is a mature, production-grade compiler and linker that translates Scala source code into JavaScript (and experimentally WebAssembly). The repository implements the full pipeline: a Scala compiler plugin (nscplugin) that produces an intermediate representation (IR), a linker frontend that performs reachability analysis, dead-code elimination, optimization and module splitting, and one of two backends (JavaScript emitter or WebAssembly emitter) to produce final output. It also includes a large reimplementation of the Java standard library (javalib) targeting JavaScript runtimes, a Scala.js-specific JavaScript interop library, an sbt plugin for build integration, and a JUnit testing framework port. The architecture is multi-module and cross-version (Scala 2.12/2.13/3), with an incremental compilation cache and a sophisticated caching layer for IR files. The codebase exhibits high craftsmanship: reusable typeclass patterns for NIO buffers, a generic versioning/fingerprinting system for cache invalidation, a monadic tracking mechanism for global variable references in the JS emitter, and an inner optimizer that replaces integer divisions with multiply-shift sequences. However, it also carries some technical drift from deprecated APIs (Closure Compiler, old linker interfaces) and dual implementations for old vs new Scala collections.