- Lexers
- Parsers
- Codegen
- String interning
- Just-in-time compilation
- Compiler framework
- Error reporting
- Language server protocol
- Testing
- Incremental compilation
- Floats/Ints/Bools
- Binary & object file parsing, generating and processing
- Solvers
- CLI
- Repl
- String handling
- Syntax trees
- Pretty printing
- Variable binding
- Caching
- WASM
- Logging
- Storage
- Incremental Analysis
- Fuzzing
- Graphs
- Type Checking
- Peephole Optimization
- Garbage Collection
- Guides & Resources
- Uncategorized
logosLogos has two goals: To make it easy to create a Lexer, so you can focus on more complex problems and to make the generated Lexer faster than anything you'd write by handlrlexA replacement forlex/flexthat generates Rust codelexgenA fully-featured lexer generator, implemented as a proc macro.
lalrpopA convenient LR(1) parser generatornomA byte-oriented, zero-copy, parser combinators librarycombineFast parser combinators on arbitrary streams with zero-copy support.pomPEG parser combinators using operator overloading without macros.pegA simple Parsing Expression Grammar (PEG) parser generator.glueGlue is a parser combinator framework for parsing text based formats, it is easy to use and relatively fast tooprattA general purpose pratt parser for RustpestA general purpose parser written in Rust with a focus on accessibility, correctness, and performance using parsing expression grammars (PEG)lrparA Yacc-compatible parser.nimbleparse_lspAn LSP server for quickly developing lrpar parsers, which parses input buffers on grammar change bypassing code generation.
tree-sitterA parser generator for building fast editor-friendly parsers with features like streaming, incremental, resumable (re)parsing, with timeouts and cancellations, and advanced syntax node queries.rowanGeneric lossless syntax treesungrammarA DSL for specifying concrete syntax trees, see this introductory post
cstreeA fork ofrowanwith threadsafe syntax trees and built-in source string interningchompChomp is a fast monadic-style parser combinator library designed to work on stable RustoakA typed parser generator embedded in Rust code for Parsing Expression GrammarschumskyA friendly parser combinator crate that makes writing LL(k) parsers with error recovery easyrust-sitterA package for defining tree-sitter grammars alongside Rust logic
regexAn implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.regressA regular expression engine targeting EcmaScript syntax.onigRust-Onig is a set of Rust bindings for the Oniguruma regular expression library.
craneliftCranelift is a low-level retargetable code generatorllvm-sysBindings to LLVM's C APIiced-x86A blazing fast and correct x86/x64 disassembler, assembler and instruction decoderllamaFriendly LLVM bindingsinkwellInkwell aims to help you pen your own programming languages by safely wrapping llvm-sysllvm-irLLVM IR in natural Rust data structuresllvmenvManage multiple LLVM/Clang buildswalrusA library for performing WebAssembly transformationscilkToy Compiler Infrastructure influenced by LLVM written in Rust.
lassoA multithreaded and single threaded string interner with a minimal memory footprint and arena allocationstring-internerA data structure to cache strings efficientlysimple-internerA simple append-only internerstring_cacheA string interning library for Rust, developed as part of the Servo project
iced-x86A blazing fast and correct x86/x64 disassembler, assembler and instruction decodermasm-rsA JSC/SpiderMonkey like macro assemblerb3Rust port of B3, LLVM-like backendjit(LibJIT) Just-In-Time Compilation in Rust using LibJIT bindingslightning-sysGNU lightning bindings for rustgccjitHigher-level Rust bindings for libgccjitcraneliftCranelift is a low-level retargetable code generatorcranelift-jit-demoA JIT compiler and runtime for a toy language, using Cranelift
dynasmA Dynamic assembler written in Rust for Rust
xrcfThe eXtensible and Reusable Compiler Framework (xrcf) is a library for building compilers
codespan-reportingBeautiful diagnostic reporting for text-based programming languagescodespanData structures for tracking locations in source codetext-sizeA library that provides newtype wrappers foru32and(u32, u32)for use as text offsetsariadneA fancy diagnostics & reporting cratemietteFancy diagnostic reporting library and protocol for us mere mortals who aren't compiler hackers
lsp-typesTypes for interaction with a language server, using VSCode's Language Server Protocoltower-lspLanguage Server Protocol implementation based on Towercodespan-lspConversions between codespan types and Language Server Protocol typeslsp-serverA generic LSP server scaffold
goldentestsA golden file testing library where tests can be configured within the same test filelang_testerConcise language testing framework for compilers and VMs (Linux only)libtest-mimicDynamically construct a test-harness that looks and behaves like Rust's built-in test harnesscompiletest_rsThe compiletest utility from the Rust compiler as a standalone testing harnessinstaA snapshot testing library for Rustk9Snapshot testing and better assertionsbulk_examples_generatorA tool created in Rust for create dozens/hundreds/thousands/millions of random examples based on a pest grammar (PEG)
unicode-xidDetermine if a char is a valid identifier for a parser and/or lexer according to Unicode Standard Annex #31 rules.unicode-normalisationUnicode character composition and decomposition utilities as described in Unicode Standard Annex #15unicode-segmentationIterators which split strings on Grapheme Cluster or Word boundaries, according to the Unicode Standard Annex #29 rulesunicode-widthDetermine displayed width of char and str types according to Unicode Standard Annex #11 ruleslexical-sortLexicographical sorting of unicode strings
salsaA generic framework for on-demand, incrementalized computationverdeA refreshingly simple incremental computation library
lexicalLexical, to- and from-string conversion routines (Fast lexical conversion routines for bothstdandno_stdenvironments)lexical-coreLexical, to- and from-string conversion routines (Low-level, lexical conversion routines for use in ano_stdcontext)lexical_boolA bool-like type that can be parsed from a stringryuA Rust implementation of the PLDI'18 paper Ryū: fast float-to-string conversion by Ulf Adamsryu-jsRyū-js is a fork of the ryu crate adjusted to comply to the ECMAScript number-to-string algorithmhexponentC11 compliant hex float parsingordered-floatTotal ordering on floatshalfA half-precision floating pointf16type for Rust implementing the IEEE 754-2008 standardf128Bindings to the gcc quadmath libraryapproxApproximate floating point equality comparisons and assertions
goblinAn impish, cross-platform, ELF, Mach-o, and PE binary parsing and loading crategimliA library for reading and writing the DWARF debugging format.faerieELF and Mach-o native binary object file emitterobjectA unified interface for reading and writing object file formats.elfA pure-rust library for parsing ELF fileselfkitAn elf parser and manipulation library in pure rust
haybaleSymbolic execution of LLVM IR
rsmt2Wrapper for SMT-LIB 2 compliant SMT solvers.z3A high-level rust bindings for the Z3 SMT solver from Microsoft Researchz3-sysLow-level bindings for the Z3 SMT solver from Microsoft Researchz3_refA high level interface to the Z3 SMT solverz3dZ3 DSL interface for RustboolectorSafe high-level bindings for the Boolector SMT solverboolector-sysLow-level bindings for the Boolector SMT solversmt2utilsLibraries and tools for the SMT-LIB-2 standardsmt2parserA generic parser for SMT2 commands, as specified by the SMT-LIB-2 standardsmt2proxyAn experimental binary tool to intercept and pre-process SMT2 commands before they are send to an SMT solverz3tracerAn experimental parser for Z3 tracing logs obtained by passingtrace=true proof=trueto Z3
good_lpMixed Integer Linear Programming for Rust, with an user-friendly API. This crate allows modeling LP problems, and lets you solve them with various solvers.- Axiom Profiler A tool for visualising, analysing and understanding quantifier instantiations made via E-matching in a run of an SMT solver
- [2017][PDF] Counterexample Guided Inductive Optimization based on Satisfiability Modulo Theories
structoptParse command line arguments by defining a structclapA simple to use, efficient, and full-featured Command Line Argument Parserpico-argsAn ultra simple CLI arguments parserarghA derive-based argument parser optimized for code size
etceteraA library that aims to allow you to determine the locations of configuration, cache and data files for your application. Existing Rust libraries generally do not give you a choice in terms of which standards/conventions (Etcetera calls these ‘strategies’) they follow. Etcetera, on the other hand, gives you the choicetomlA TOML decoder and encoder for Rust (optionally uses serde)envyDeserialize environment variables into typesafe structs (uses serde)
rustylineRustyline, a readline implementation based on Antirez's Linenoiserepl-rsLibrary to generate a REPL for your applicationtermwizTerminal Wizardry for Unix and Windows
beefFaster, more compact implementation ofCow.smol_strSmall-string optimized string type with O(1) clonesmallstring'Small string' optimization: store small strings on the stack using smallvecheckHeck is a case conversion library that exists to provide case conversion between common cases like CamelCase and snake_case. It is intended to be unicode aware, internally consistent, and reasonably well performingropeyRopey is a utf8 text rope for Rust, designed to be the backing text-buffer for applications such as text editors. Ropey is fast, robust, and can handle huge texts and memory-incoherent edits with ease.
rowanGeneric lossless syntax treescstreeA fork ofrowanwith threadsafe syntax trees and built-in source string interning
prettyWadler-style pretty-printing combinators in Rust
monikerAn automagical variable binding library for tracking variables in scopes
cachedCaching structures and simplified function memoization
wainWebAssembly interpreter written in Safe Rust with zero dependencieswasmerThe high-level public API of the Wasmer WebAssembly runtimewasmtimeHigh-level API to expose the Wasmtime runtimewasmtime-jitJIT-style execution for WebAsssembly code in Craneliftwasmlite-parserThis crate parses WebAssembly modules and can generate LLVM IR based the data extracted from a moduleparity-wasm-cpWebAssembly binary format serialization/deserialization/interpretersubstrate-wasm-builderA utility for building WASM binarieswalrusA library for performing WebAssembly transformations
tracingApplication-level tracing for Rusttracing-treeA Tracing Layer which prints a tree of spans and events.tracing-forestPreserving contextual coherence among trace data from concurrent taskstracing-timingInter-event timing metrics on top oftracingtracing-cozRust-tracing support for the coz Causal Profilertracing-flameA tracingLayerfor generating a folded stack trace for generating flamegraphs and flamecharts with infernotest-env-logA crate that takes care of automatically initializing logging and/or tracing for Rust tests.tracing-unwrapThis crate provides.unwrap_or_log()and.expect_or_log()methods onResultandOptiontypes that log failed unwraps to atracing::Subscriber
logA Rust library providing a lightweight logging facadeslogAn ecosystem of reusable components for structured, extensible, composable and contextual logging for Rust
slotmapContainers with persistent unique keys to access stored values: Insertion, deletion and access all take O(1) time with low overhead.indexmapA hash table with consistent order and fast iterationvecmapVec-based Map and Set data structures
union-findStruct and methods for union-find operationenaAn implementation of union-find in Rust; extracted from (and used by) rustc
timelyA low-latency cyclic dataflow computational model, introduced in the paper Naiad: a timely dataflow systemdifferential-dataflowA data-parallel programming framework designed to efficiently process large volumes of data and to quickly respond to arbitrary changes in input collections, an implementation of differential dataflow over timely dataflow on Rust.dogsdogsdogsWorst-case optimal joins and delta queries in differential dataflowdataflow-joinA streaming implementation of Ngo et al'sGenericJoinin timely dataflowtimely-sortAn cache-aware implementation of radix sort in RustdiagnosticsDiagnostic tools fortimely-datafflowanddifferential-dataflowcomputations
differential-datalogA programming language for incremental computation based ontimely-dataflowanddifferential-dataflow, similar toIncAorSouffle
- Naiad: a timely dataflow system
- Timely Dataflow Book
- Differential Dataflow
- Differential Dataflow Book
- Sudoku in Differential Dataflow: blog, video series
- An introduction to Timely Dataflow: part 1, part 2, part 3
- An introduction to Differential Dataflow: part 1, part 2
- Differential Dataflow meets Calculus
honggfuzz-rsHonggfuzz is a security oriented fuzzer with powerful analysis options that supports evolutionary, feedback-driven fuzzing based on code coveragecargo-fuzzA cargo subcommand for using libFuzzerlibfuzzer-sysBarebones wrapper around LLVM's libFuzzer runtime librarywasm-smithA WebAssembly test case generatorfuzzcheckA structure-aware coverage-guided fuzzerlibafltest-fuzz
eggEgg is a flexible, high-performance e-graph librarypetgraphA graph data structure library. Provides graph types and graph algorithmstimelyA low-latency cyclic dataflow computational model, introduced in the paper Naiad: a timely dataflow systemdifferential-dataflowA data-parallel programming framework designed to efficiently process large volumes of data and to quickly respond to arbitrary changes in input collections, an implementation of differential dataflow over timely dataflow on Rust.
rusttycAn interface that allows for an intuitive translation of inference rules based on a Hindney-Milner-like bounded type meet-semilattice into rust codepolytypeA Hindley-Milner polymorphic typing system
eggEgg is a flexible, high-performance e-graph librarypeepmaticA DSL for peephole optimizations and compiler for generating peephole optimizers from them
broomAn ergonomic tracing garbage collector that supports mark 'n sweep garbage collectiongcA simple tracing (mark and sweep) garbage collector for RustshredderGarbage collection as a library for RustcometA garbage collection library for implementing VMs in RustmmtkMemory Management ToolKit (MMTk) for portable & efficient memory management in language VMs
- Making a language in Rust A series about making a programming language called Eldiro using the Rust programming language
- Crafting Interpreters Implementing everything from parsing to garbage collection to bytecode VMs, highly reccomended as an introduction to language development (Homepage)
- Create Your Own Programming Language with Rust
- Where to Start Hand-Writing a Parser (in Rust)
- Writing a simple parser in Rust
- GC and Rust part 0, part 1 and part 2
- Matklad on pratt parsing: Simple but Powerful Pratt Parsing and From Pratt to Dikjstra
- Pure AST based linting sucks
- LLVM's Kaleidoscope in Rust The Kaleidoscope Language tutorial, showing how to implement a simple language using LLVM in Rust
- Where to Start Hand-Writing a Parser (in Rust) An introduction to programming language parsing in which we hand-write a parser and run it on some real input
- x86 and amd64 instruction reference
- X86 Opcode and Instruction Reference
- Linear Scan Register Allocation on SSA Form
- A bibliography of papers related to symbolic execution
- Instruction Latencies, Throughput and Micro-Operation Breakdowns for Intel, AMD and VIA CPUs
- [1995][PDF] Symbolic Range Propagation
- [2001][PDF] Efficient Symbolic Analysis for Optimizing Compilers
- [2021][Video] A New Approach to Removing Redundant Conditions in LLVM
- [2017][Video] Polyhedral Value & Memory Analysis
- Simplify: A Theorem Prover for Program Checking
- Elegant and performant recursion in Rust
- Speculation in JavaScriptCore
- Whippet: A new GC for Guile
- Type Checking in less than 100 lines of Rust (Credit to @zesterer)
- Bidirectional Type Checking in ~200 lines of OCaml (Written in OCaml, credit to @mb64)
- [2020][PDF] Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism
- Implementation of "Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism" (Written in Rust, from @segeljakt)
- Implementation of "Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism" (Written in Rust, from @JDemler)
- A bidirectional type inference system loosely based on Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism. (Written in Haskell)
- Didactic implementation of the type checker described in "Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism" (Written in OCaml)
- An implementation of a predicative polymorphic language with bidirectional type inference and algebraic data types (Written in Haskell)
- Inlining Decisions in Visual Studio
- C++ Inliner Improvements: The Zipliner
- John Carmack on Inlined Code
- How RyuJIT inlines a function (heuristics)
- Smarter C/C++ inlining with attribute((flatten))
- Do compilers take inline as a hint?
- cmd/compile: improve inlining cost model
- What does 'inline' mean?
- Zebu VM check_should_inline_func()
- Warp: Improved JS performance in Firefox 83
- When Short Methods Pay Off: JIT Inlining
- cross-module inlining in guile -- wingolog
- Inline In Rust
- It’s Not Always iCache
- [2003][PDF] Adaptive Online Context-Sensitive Inlining
- [2003][PDF] To Inline or Not to Inline. Enhanced Inlining Decisions
- [2004][PDF] Fast and Effective Procedure Inlining
- [2016][PDF] CSE P 501 - Compilers. Inlining and Devirtualization
- [2017][PDF] TurboFan Inlining Heuristics
- [2019][PDF] Guiding Inlining Decisions Using Post-Inlining Transformations
- [2019][PDF] An Optimization-Driven Incremental Inline Substitution Algorithm for Just-in-Time Compilers
- [2021][PDF] Inlining for Code Size Reduction
- [2020][PDF] RVSDG: An Intermediate Representation for Optimizing Compilers
- [2018][PDF] RVSDG: An Intermediate Representation for the Multi-Core Era
- [2015][PDF] Perfect Reconstructability of Control Flow from Demand Dependence Graphs
- Principles, Techniques, and Tools for Explicit and Automatic Parallelization
- [Slides] Compiling with the Regionalized Value State Dependence Graph
- JLM RVSDG Implementation (C++)
- JIVE RVSDG Graph Implementation (C++)
- RVSDG Viewer (C++)
- Cranial Coitus RVSDG Brainfuck Optimizer (Rust)
- [2018][PDF] Semantic Reasoning About the Sea of Nodes
- [1994][PDF] Value dependence graphs: representation without taxation
- [2016][PDF] Value State Flow Graph: A Dataflow Compiler IR for Accelerating Control-Intensive Code in Spatial Hardware
- Numba Python JIT RVSDG Optimizer
- [Archived] Rain IR A dependently-typed RVSDG with liftetimes, implemented in Rust
- [2010][PDF] Equality Saturation: A New Approach to Optimization
- [2020][PDF] egg: Fast and Extensible Equality Saturation
- [2021][PDF] Rewrite Rule Inference Using Equality Saturation
- [2021][PDF] Sketch-Guided Equality Saturation: Scaling Equality Saturation to Complex Optimizations in Languages with Bindings
- [2021][PDF] Caviar: An E-graph Based TRS for Automatic Code Optimization
- [2002][PDF] SPORES: Sum-Product Optimization via Relational Equality Saturation for Large Scale Linear Algebra
- [2021][PDF] Relational E-Matching
- [2021][PDF] Rewrite Rule Inference Using Equality Saturation
- Turns are Better than Radians An interesting blog post about using turns instead of pi or tau for trigometric calculations, could be inspiration for some interesting code transformations
- Algorithms for Modern Hardware (russian version) Low-level performance tuning for modern hardware