thehardwarestore.ai

where AI agents shop for the right tools

── 99543 repos indexed ── | filtered by tag: javascript-compiler
babel/babel ★ 44043 5991 APPLICATION

Babel is a production-grade JavaScript/TypeScript compiler toolchain organized as a large monorepo of npm packages. In production it parses modern and experimental ECMAScript (plus JSX, Flow, and TypeScript), transforms it through a plugin/preset system, and emits backward-compatible JavaScript with source maps. The core pipeline is: babel-parser produces an AST, babel-traverse walks and mutates it using plugin-defined visitors, babel-types provides builders/validators, babel-helpers injects runtime helper functions, and babel-generator prints the final code. Primary entry points are @babel/core's transform/transformFile/parse APIs, the babel-cli, babel-register's require hook, babel-node, and babel-standalone for in-browser use. Its configuration system is notably sophisticated: babel-core resolves babel.config.*, .babelrc, and package.json config, validates options, caches them, merges plugins/presets, and unifies sync/async behavior via gensync. External dependencies include browserslist/compat-data for target-aware transforms and standard Node infrastructure; it also integrates with ESLint, bundlers, and major frameworks. This is not a data/research repository; the massive fixture corpus is regression-test data, not analytical data. The codebase is actively maintained, with ongoing Babel 8 work visible through BABEL_8_BREAKING conditionals and migration scripts. Overall craftsmanship is exceptional: visitor merging, scope analysis, helper injection, and plugin factories are carefully factored into reusable, well-isolated helper packages.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
webpack/webpack ★ 65964 9547 APPLICATION

Webpack is a mature, highly configurable JavaScript module bundler that transforms, bundles, and optimizes frontend assets. Its architecture is plugin-based: a core compilation pipeline (Compiler, Compilation, Chunk, ModuleGraph) is extended by hundreds of built-in plugins covering code splitting, tree-shaking, CSS/HTML/JSON/WASM handling, module federation, HMR, caching, and performance hints. The codebase is exceptionally well-tested with thousands of integration tests, and it demonstrates deep engineering craftsmanship in areas like custom serialization for persistent caching, efficient graph algorithms for chunk splitting, and a rule-matching engine for loader configuration. While primarily a build tool, it also includes data-driven performance analysis features (e.g., unused module detection, bundle size warnings) and benchmark infrastructure, giving it a hybrid character.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 5 reusable components found
scala-js/scala-js ★ 4711 408 APPLICATION

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.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 6 reusable components found
CanadaHonk/porffor ★ 5325 138 APPLICATION

Porffor is an ahead-of-time (AOT) JavaScript compiler and lightweight runtime, written primarily in JavaScript and TypeScript. It compiles JS/TS source code into C, then to native binaries via an external C compiler (e.g., TCC, GCC, or Clang). The system includes a full ECMAScript built-in library, a self-hosted compiler pipeline (the compiler compiles itself), and a custom intermediate representation (IR) with constant folding, effect tracking, and type inference. It supports modern JS features including async/await, generators, Promises, classes, modules, and most built-in objects, with a particular focus on performance through techniques like coroutine lowering, inline caching, and compile-time evaluation. Architecturally, the compiler is a classic three-stage pipeline: parser (custom ESTree-compatible parser with full TypeScript support), code generator (AST-to-IR lowering with closure analysis and type inference), and renderer (IR-to-C code generation with runtime embedding). The runtime is split into a small C core (providing garbage collection, coroutine support, and native fetch) and JS-implemented built-ins that leverage an explicit memory model and low-level IR intrinsics. The project also includes a comprehensive benchmark suite (based on the V8 benchmark suite) and a test262 runner for ECMAScript conformance tracking. A notable aspect is the self-hosting infrastructure: the compiler can compile its own source code, and the repository includes build scripts, a profile-guided optimization pipeline in CI, and cross-platform binary releases. While primarily an application (compiler/runtime toolchain), it also contains non-trivial performance measurement and conformance tracking code, giving it a slight hybrid character. The codebase is early-stage but shows high engineering quality with many carefully optimized components, though some files are monolithic and tightly coupled.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 2 reusable components found
curiosity-ai/h5 ★ 294 37 APPLICATION

H5 is a C# to JavaScript/TypeScript transpiler that enables C# developers to target web platforms. The system consists of a compiler service (h5-compiler dotnet tool), a translator core that converts C# AST to JavaScript/TypeScript using visitor patterns and attribute-driven rules, and runtime libraries providing .NET-like functionality in JavaScript. Key features include SDK-style project integration, extensive globalization support through locale definitions, and support for JavaScript interop via attributes like [H5.External] and [H5.Template]. The toolchain processes C# source files through lexical analysis (using NRefactory), semantic analysis, translation to target language syntax, and emits JavaScript/TypeScript output with optional source maps and HTML wrappers.

RATING: 7.8/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: