This repository implements the Go programming language: a complete compiler toolchain, runtime, and standard library. The compiler (`cmd/compile`) translates Go source into machine code through an SSA intermediate representation with architecture-specific backends. The `go` command (`cmd/go`) provides module management, build orchestration, testing, and toolchain version selection. The runtime (`src/runtime`) handles goroutines, GC, memory management, and platform abstractions. The standard library (e.g., `net`, `crypto`, `os`, `encoding`, `testing`) offers production-ready packages. The architecture is modular: clear separation between toolchain commands and library packages, heavy use of internal packages for shared low-level functionality (e.g., `internal/cpu`, `internal/poll`, `internal/bytealg`), and extensive platform-specific code via build tags. The codebase is exceptionally well-engineered, with comprehensive test coverage, fuzz testing, and a rigorous change control process. It is the reference implementation of the Go language and defines the ecosystem's standards.
This repository is the main source code for the Rust programming language compiler (rustc) and its standard library. It is a monorepo containing the compiler, standard library (core, alloc, std), and development tools (clippy linter, miri interpreter, rustfmt formatter, rust-analyzer, rustdoc documentation generator). The compiler is implemented as a collection of Rust crates under compiler/, each handling a specific phase: lexing, parsing, AST construction, HIR lowering, type inference, borrow checking, MIR optimization, and code generation (LLVM, GCC, Cranelift backends). The architecture is modular with well-defined interfaces between phases, enabling incremental compilation and separate development of backends. The primary entry point is compiler/rustc/src/main.rs, which drives the compilation pipeline. Source code flows through the lexer, parser, AST, HIR, MIR, and finally to code generation. The borrow checker (rustc_borrowck) performs region-based static analysis for memory safety. The type inference engine (rustc_infer) handles complex type relationships including generics, traits, and higher-ranked types. The MIR optimization framework (rustc_mir_transform) applies numerous passes such as constant propagation, dead store elimination, and GVN. External dependencies include LLVM for the primary code generation backend, libgccjit for the GCC backend, and various system libraries for platform-specific functionality. The standard library provides OS abstractions, synchronization primitives, I/O, and collections. The repository also includes extensive test suites (tests/) covering compiler diagnostics, code generation, optimization, and tool behavior.
This is the Swift compiler and standard library repository, implementing the full Swift language toolchain. It includes the compiler frontend (parser, type checker, SIL optimizer, LLVM IR generation), runtime libraries (memory management, concurrency, reflection), platform overlays (Android, WASI, Windows), interop layers (C, C++, Objective-C), IDE support (SourceKit, code completion, refactoring), and an extensive test suite. The architecture is a monolith of multiple libraries and executables, with key entry points being the `swiftc` compiler driver, `sourcekitd` IDE service, and the Swift runtime libraries. Data flows from source code through AST, SIL, and LLVM IR to machine code, with module serialization/deserialization. External dependencies include LLVM, Clang, libdispatch, and ICU. The codebase demonstrates world-class engineering craftsmanship with well-defined abstractions and comprehensive testing.
Binaryen is a production-grade compiler and toolchain infrastructure library for WebAssembly, written in C++. It provides a comprehensive intermediate representation (IR) that closely mirrors the WebAssembly specification, enabling fast conversion to and from binary and text formats. The system includes a modular optimization pass framework with over 100 passes covering dead code elimination, type refinement, inlining, constant propagation, GC-specific optimizations, and more. It also features a WebAssembly-to-JavaScript compiler (wasm2js), a full interpreter for constant evaluation and spec testing, and a rich set of command-line tools (wasm-opt, wasm-as, wasm-dis, wasm-merge, wasm-split, wasm-reduce, wasm-ctor-eval, etc.). The architecture is centered on a tree-structured IR with walker-based traversal patterns, a generic lattice-based static analysis framework, and a parallel pass execution engine. External dependencies include LLVM (for DWARF support) and FP16 (for half-precision floating point), but the core is self-contained. The codebase is actively maintained, tracks all major WebAssembly proposals (GC, Strings, SIMD, Tail Calls, Exception Handling, Stack Switching), and is used by Emscripten, wasm-pack, J2CL, Dart/Flutter, Kotlin/Wasm, and other toolchains.
This repository is the compiler toolchain for the Carbon Language, an experimental successor to C++ focused on performance, C++ interoperability, and memory safety. The codebase implements a full compilation pipeline from lexing and parsing through semantic analysis (SemIR) to LLVM IR code generation, along with a language server (LSP), a formatting tool, and C++ interop via Clang integration. The architecture follows a phased compiler design with distinct modules for lex, parse, check, sem_ir, lower, and driver, all orchestrated through a Bazel build system. Key entry points include the main driver binary (`toolchain/driver/`) with subcommands like `compile`, `link`, `build`, `format`, and `language-server`, and the semantic checker (`toolchain/check/`) which handles type checking, generics, and impl resolution. The toolchain also features a robust diagnostics system, a custom high-performance hashtable, and an extensive file-based testing framework with automatic CHECK-line updates. The codebase is actively developed with frequent commits, extensive test coverage, and fuzz testing, though it remains experimental and subject to breaking changes.
cross-rs/cross is a CLI tool that enables zero-setup cross-compilation for Rust projects by wrapping Cargo and executing builds inside container engines (Docker/Podman). It manages a comprehensive registry of pre-built Docker images for dozens of target triples (Linux, musl, Android, FreeBSD, NetBSD, Solaris, Windows, bare-metal, etc.), automatically selects the appropriate image based on the --target flag, mounts the project source and toolchain, and runs cargo build/test inside the container. The tool also supports remote Docker execution, custom Dockerfiles, and advanced configuration via Cross.toml and environment variables. The codebase is structured as a Rust CLI with two binaries (cross and cross-util), a library of container orchestration modules, and a developer xtask workspace for CI, codegen, and changelog management. It demonstrates strong engineering practices with extensive CI, testing, and reusable patterns for command execution, container abstraction, and configuration merging. The repository includes a large collection of Dockerfiles and shell scripts for building target-specific toolchain images, as well as CI workflows that test across many platforms and container engines.
This repository is a toolchain for generating Apple Configuration Profiles (.mobileconfig) that configure DNS over HTTPS (DoH) and DNS over TLS (DoT) on iOS, iPadOS, and macOS devices. It maintains a curated registry of public encrypted DNS providers (e.g., AdGuard, Cloudflare, Quad9, CleanBrowsing) with metadata such as server addresses, filtering capabilities, and region. The build pipeline reads provider definitions from JSON files under src/, generates unsigned profiles in profiles/, optionally signs them with CMS digital signatures using a user-provided ECC certificate, and places signed versions in signed/. It also produces multi-language README files (English, Simplified Chinese, Traditional Chinese) with provider tables and installation links. The architecture is a set of TypeScript scripts executed via npm commands (build, sign, new, test). There is no runtime server or daemon; the output is static files intended for manual installation by end users. The interactive CLI (npm run new) guides users through creating new provider profiles with validation and optional signing. The codebase demonstrates solid engineering practices: deterministic UUIDs (v5) for stable profile identifiers, CMS signing with both Node.js crypto and OpenSSL parity tests, and a modular design that separates provider data, language templates, and build logic. While the repository is primarily a build tool, it also serves as a reference for encrypted DNS provider capabilities and a practical solution for deploying encrypted DNS on Apple devices. The signed profiles provide authenticity verification, and the multi-language support broadens accessibility. The code is well-structured and maintainable, though it relies on external certificates for signing and manual updates to provider data when server endpoints change.
KernelScript is a domain-specific language and compiler (OCaml) for developing eBPF-centric programs. The compiler translates a single `.ks` source file into multiple C outputs: idiomatic eBPF C code (for kernel execution via XDP, TC, kprobe, tracepoint, perf_event, struct_ops), userspace loader C code (managing maps, ring buffers, tail calls, and program lifetime), and optionally kernel module C code (for `@kfunc` functions). The compiler pipeline includes lexing, parsing, symbol table construction, type checking (including context-specific rules for eBPF program types), IR generation with control-flow and data-flow analysis, loop analysis (bound detection, bpf_loop optimization), tail-call detection and automatic progarry management, map assignment optimization, safety checking (null pointer, bounds, overflow), and multi-program optimization (map type changes, batching). It also supports BTF introspection for kernel type and kfunc extraction, a Python bridge, and a compile-time evaluator. The architecture is modular with pluggable context code generators per program type. The project includes an extensive test suite covering the full pipeline from parse to C output and specific features like perf_event attach, ring buffer dispatch, struct_ops, and multi-program scenario.