├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Langdev libraries for Rust 2 | 3 | - [Lexers](#lexers) 4 | - [Parsers](#parsers) 5 | - [Codegen](#codegen) 6 | - [String interning](#string-interning) 7 | - [Just-in-time compilation](#just-in-time-compilation) 8 | - [Compiler framework](#compiler-framework) 9 | - [Error reporting](#error-reporting) 10 | - [Language server protocol](#language-server-protocol) 11 | - [Testing](#testing) 12 | - [Incremental compilation](#incremental-compilation) 13 | - [Floats/Ints/Bools](#floatsintsbools) 14 | - [Binary & object file parsing, generating and processing](#binary--object-file-parsing-generating-and-processing) 15 | - [Solvers](#solvers) 16 | - [CLI](#cli) 17 | - [Configuration](#configuration) 18 | - [Repl](#repl) 19 | - [String handling](#string-handling) 20 | - [Syntax trees](#syntax-trees) 21 | - [Pretty printing](#pretty-printing) 22 | - [Variable binding](#variable-binding) 23 | - [Caching](#caching) 24 | - [WASM](#wasm) 25 | - [Logging](#logging) 26 | - [Storage](#storage) 27 | - [Disjoint-sets](#disjoint-sets) 28 | - [Incremental Analysis](#incremental-analysis) 29 | - [Timely Dataflow Resources](#timely-dataflow-resources) 30 | - [Fuzzing](#fuzzing) 31 | - [Fuzzing Resources](#fuzzing-resources) 32 | - [Graphs](#graphs) 33 | - [Type Checking](#type-checking) 34 | - [Peephole Optimization](#peephole-optimization) 35 | - [Garbage Collection](#garbage-collection) 36 | - [Guides & Resources](#guides--resources) 37 | - [Type Checking](#type-checking-1) 38 | - [Inlining](#inlining) 39 | - [RVSDG](#rvsdg) 40 | - [Equality Saturation](#equality-saturation) 41 | - [Uncategorized](#uncategorized) 42 | 43 | ## Lexers 44 | 45 | - [`logos`](https://crates.io/crates/logos) Logos 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 hand 46 | - [`lrlex`](https://crates.io/crates/lrlex) A replacement for [`lex`](http://dinosaur.compilertools.net/lex/index.html)/[`flex`](https://westes.github.io/flex/manual/) that generates Rust code 47 | - [`lexgen`](https://crates.io/crates/lexgen) A fully-featured lexer generator, implemented as a proc macro. 48 | 49 | ## Parsers 50 | 51 | - [`lalrpop`](https://crates.io/crates/lalrpop) A convenient LR(1) parser generator 52 | - [`nom`](https://crates.io/crates/nom) A byte-oriented, zero-copy, parser combinators library 53 | - [`combine`](https://crates.io/crates/combine) Fast parser combinators on arbitrary streams with zero-copy support. 54 | - [`pom`](https://crates.io/crates/pom) PEG parser combinators using operator overloading without macros. 55 | - [`peg`](https://crates.io/crates/peg) A simple Parsing Expression Grammar (PEG) parser generator. 56 | - [`glue`](https://crates.io/crates/glue) Glue is a parser combinator framework for parsing text based formats, it is easy to use and relatively fast too 57 | - [`pratt`](https://crates.io/crates/pratt) A general purpose pratt parser for Rust 58 | - [`pest`](https://crates.io/crates/pest) A general purpose parser written in Rust with a focus on accessibility, correctness, and performance using parsing expression grammars (PEG) 59 | - [`lrpar`](https://crates.io/crates/lrpar) A Yacc-compatible parser. 60 | - [`nimbleparse_lsp`](https://github.com/ratmice/nimbleparse_lsp) An LSP server for quickly developing lrpar parsers, which parses input buffers on grammar change bypassing code generation. 61 | - [`tree-sitter`](https://tree-sitter.github.io/tree-sitter/) A 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. 62 | - [`rowan`](https://crates.io/crates/rowan) Generic lossless syntax trees 63 | - [`ungrammar`](https://crates.io/crates/ungrammar) A DSL for specifying concrete syntax trees, see [this introductory post](https://rust-analyzer.github.io/blog/2020/10/24/introducing-ungrammar.html) 64 | - [`cstree`](https://crates.io/crates/cstree) A fork of `rowan` with threadsafe syntax trees and built-in [source string interning](#string-interning) 65 | - [`chomp`](https://crates.io/crates/chomp) Chomp is a fast monadic-style parser combinator library designed to work on stable Rust 66 | - [`oak`](https://crates.io/crates/oak) A typed parser generator embedded in Rust code for Parsing Expression Grammars 67 | - [`chumsky`](https://crates.io/crates/chumsky) A friendly parser combinator crate that makes writing LL(k) parsers with error recovery easy 68 | - [`rust-sitter`](https://crates.io/crates/rust-sitter) A package for defining tree-sitter grammars alongside Rust logic 69 | 70 | ## Regular expressions 71 | 72 | - [`regex`](https://crates.io/crates/regex) An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs. 73 | - [`regress`](https://crates.io/crates/regress) A regular expression engine targeting EcmaScript syntax. 74 | - [`onig`](https://crates.io/crates/onig) Rust-Onig is a set of Rust bindings for the Oniguruma regular expression library. 75 | 76 | ## Codegen 77 | 78 | - [`cranelift`](https://crates.io/crates/cranelift) Cranelift is a low-level retargetable code generator 79 | - [`llvm-sys`](https://crates.io/crates/llvm-sys) Bindings to LLVM's C API 80 | - [`iced-x86`](https://crates.io/crates/iced-x86) A blazing fast and correct x86/x64 disassembler, assembler and instruction decoder 81 | - [`llama`](https://crates.io/crates/llama) Friendly LLVM bindings 82 | - [`inkwell`](https://crates.io/crates/inkwell) Inkwell aims to help you pen your own programming languages by safely wrapping llvm-sys 83 | - [`llvm-ir`](https://crates.io/crates/llvm-ir) LLVM IR in natural Rust data structures 84 | - [`llvmenv`](https://crates.io/crates/llvmenv) Manage multiple LLVM/Clang builds 85 | - [`walrus`](https://crates.io/crates/walrus) A library for performing WebAssembly transformations 86 | - [`cilk`](https://github.com/maekawatoshiki/cilk) Toy Compiler Infrastructure influenced by LLVM written in Rust. 87 | 88 | ## String interning 89 | 90 | - [`lasso`](https://crates.io/crates/lasso) A multithreaded and single threaded string interner with a minimal memory footprint and arena allocation 91 | - [`string-interner`](https://crates.io/crates/string-interner) A data structure to cache strings efficiently 92 | - [`simple-interner`](https://crates.io/crates/simple-interner) A simple append-only interner 93 | - [`string_cache`](https://crates.io/crates/string_cache) A string interning library for Rust, developed as part of the Servo project 94 | 95 | ## Just-in-time Compilation 96 | 97 | - [`iced-x86`](https://crates.io/crates/iced-x86) A blazing fast and correct x86/x64 disassembler, assembler and instruction decoder 98 | - [`masm-rs`](https://github.com/playxe/masm-rs) A JSC/SpiderMonkey like macro assembler 99 | - [`b3`](https://github.com/playXE/b3-rs) Rust port of [B3](https://webkit.org/docs/b3/), LLVM-like backend 100 | - [`jit`](https://crates.io/crates/jit) (LibJIT) Just-In-Time Compilation in Rust using LibJIT bindings 101 | - [`lightning-sys`](https://crates.io/crates/lightning-sys) GNU lightning bindings for rust 102 | - [`gccjit`](https://crates.io/crates/gccjit) Higher-level Rust bindings for libgccjit 103 | - [`cranelift`](https://crates.io/crates/cranelift) Cranelift is a low-level retargetable code generator 104 | - [`cranelift-jit-demo`](https://github.com/bytecodealliance/cranelift-jit-demo) A JIT compiler and runtime for a toy language, using Cranelift 105 | - [`dynasm`](https://crates.io/crates/dynasm) A Dynamic assembler written in Rust for Rust 106 | 107 | ## Compiler Framework 108 | 109 | - [`xrcf`](https://xrcf.org) The eXtensible and Reusable Compiler Framework (xrcf) is a library for building compilers 110 | 111 | ## Error reporting 112 | 113 | - [`codespan-reporting`](https://crates.io/crates/codespan-reporting) Beautiful diagnostic reporting for text-based programming languages 114 | - [`codespan`](https://crates.io/crates/codespan) Data structures for tracking locations in source code 115 | - [`text-size`](https://crates.io/crates/text_size) A library that provides newtype wrappers for `u32` and `(u32, u32)` for use as text offsets 116 | - [`ariadne`](https://crates.io/crates/ariadne) A fancy diagnostics & reporting crate 117 | - [`miette`](https://crates.io/crates/miette) Fancy diagnostic reporting library and protocol for us mere mortals who aren't compiler hackers 118 | 119 | ## Language server protocol 120 | 121 | - [`lsp-types`](https://crates.io/crates/lsp-types) Types for interaction with a language server, using VSCode's Language Server Protocol 122 | - [`tower-lsp`](https://crates.io/crates/tower-lsp) Language Server Protocol implementation based on Tower 123 | - [`codespan-lsp`](https://crates.io/crates/codespan-lsp) Conversions between codespan types and Language Server Protocol types 124 | - [`lsp-server`](https://crates.io/crates/lsp-server) A generic LSP server scaffold 125 | 126 | ## Testing 127 | 128 | - [`goldentests`](https://crates.io/crates/goldentests) A golden file testing library where tests can be configured within the same test file 129 | - [`lang_tester`](https://crates.io/crates/lang_tester) Concise language testing framework for compilers and VMs (Linux only) 130 | - [`libtest-mimic`](https://crates.io/crates/libtest-mimic) Dynamically construct a test-harness that looks and behaves like Rust's built-in test harness 131 | - [`compiletest_rs`](https://crates.io/crates/compiletest_rs) The compiletest utility from the Rust compiler as a standalone testing harness 132 | - [`insta`](https://crates.io/crates/insta) A snapshot testing library for Rust 133 | - [`k9`](https://crates.io/crates/k9) Snapshot testing and better assertions 134 | - [`bulk_examples_generator`](https://crates.io/crates/bulk_examples_generator) A tool created in Rust for create dozens/hundreds/thousands/millions of random examples based on a pest grammar (PEG) 135 | 136 | ## Unicode 137 | 138 | - [`unicode-xid`](https://crates.io/crates/unicode-xid) Determine if a char is a valid identifier for a parser and/or lexer according to [Unicode Standard Annex #31](https://www.unicode.org/reports/tr31/) rules. 139 | - [`unicode-normalisation`](https://crates.io/crates/unicode-normalization) Unicode character composition and decomposition utilities as described in [Unicode Standard Annex #15](http://www.unicode.org/reports/tr15/) 140 | - [`unicode-segmentation`](https://crates.io/crates/unicode-segmentation) Iterators which split strings on Grapheme Cluster or Word boundaries, according to the [Unicode Standard Annex #29](http://www.unicode.org/reports/tr29/) rules 141 | - [`unicode-width`](https://crates.io/crates/unicode-width) Determine displayed width of char and str types according to [Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/) rules 142 | - [`lexical-sort`](https://crates.io/crates/lexical-sort) Lexicographical sorting of unicode strings 143 | 144 | ## Incremental compilation 145 | 146 | - [`salsa`](https://crates.io/crates/salsa) A generic framework for on-demand, incrementalized computation 147 | - [`verde`](https://crates.io/crates/verde) A refreshingly simple incremental computation library 148 | 149 | ## Floats/Ints/Bools 150 | 151 | - [`lexical`](https://crates.io/crates/lexical) Lexical, to- and from-string conversion routines (Fast lexical conversion routines for both `std` and `no_std` environments) 152 | - [`lexical-core`](https://crates.io/crates/lexical-core) Lexical, to- and from-string conversion routines (Low-level, lexical conversion routines for use in a `no_std` context) 153 | - [`lexical_bool`](https://crates.io/crates/lexical_bool) A bool-like type that can be parsed from a string 154 | - [`ryu`](https://crates.io/crates/ryu) A Rust implementation of the PLDI'18 paper [Ryū: fast float-to-string conversion](https://dl.acm.org/doi/10.1145/3192366.3192369) by Ulf Adams 155 | - [`ryu-js`](https://crates.io/crates/ryu-js) Ryū-js is a fork of the ryu crate adjusted to comply to the ECMAScript number-to-string algorithm 156 | - [`hexponent`](https://crates.io/crates/hexponent) C11 compliant hex float parsing 157 | - [`ordered-float`](https://crates.io/crates/ordered-float) Total ordering on floats 158 | - [`half`](https://crates.io/crates/half) A half-precision floating point `f16` type for Rust implementing the IEEE 754-2008 standard 159 | - [`f128`](https://crates.io/crates/f128) Bindings to the gcc quadmath library 160 | - [`approx`](https://crates.io/crates/approx) Approximate floating point equality comparisons and assertions 161 | 162 | ## Binary & object file parsing, generating and processing 163 | 164 | - [`goblin`](https://crates.io/crates/goblin) An impish, cross-platform, ELF, Mach-o, and PE binary parsing and loading crate 165 | - [`gimli`](https://crates.io/crates/gimli) A library for reading and writing the DWARF debugging format. 166 | - [`faerie`](https://crates.io/crates/faerie) ELF and Mach-o native binary object file emitter 167 | - [`object`](https://crates.io/crates/object) A unified interface for reading and writing object file formats. 168 | - [`elf`](https://crates.io/crates/elf) A pure-rust library for parsing ELF files 169 | - [`elfkit`](https://crates.io/crates/elfkit) An elf parser and manipulation library in pure rust 170 | 171 | ## Symbolic Execution 172 | 173 | - [`haybale`](https://crates.io/crates/haybale) Symbolic execution of LLVM IR 174 | 175 | ## Solvers 176 | 177 | - [`rsmt2`](https://crates.io/crates/rsmt2) Wrapper for SMT-LIB 2 compliant SMT solvers. 178 | - [`z3`](https://crates.io/crates/z3) A high-level rust bindings for the Z3 SMT solver from Microsoft Research 179 | - [`z3-sys`](https://crates.io/crates/z3-sys) Low-level bindings for the Z3 SMT solver from Microsoft Research 180 | - [`z3_ref`](https://crates.io/crates/z3_ref) A high level interface to the Z3 SMT solver 181 | - [`z3d`](https://crates.io/crates/z3d) Z3 DSL interface for Rust 182 | - [`boolector`](https://crates.io/crates/boolector) Safe high-level bindings for the Boolector SMT solver 183 | - [`boolector-sys`](https://crates.io/crates/boolector-sys) Low-level bindings for the Boolector SMT solver 184 | - [`smt2utils`](https://github.com/facebookincubator/smt2utils) Libraries and tools for the SMT-LIB-2 standard 185 | - [`smt2parser`](https://crates.io/crates/smt2parser) A generic parser for SMT2 commands, as specified by the SMT-LIB-2 standard 186 | - [`smt2proxy`](https://crates.io/crates/smt2proxy) An experimental binary tool to intercept and pre-process SMT2 commands before they are send to an SMT solver 187 | - [`z3tracer`](https://crates.io/crates/z3tracer) An experimental parser for Z3 tracing logs obtained by passing `trace=true proof=true` to Z3 188 | - [`good_lp`](https://crates.io/crates/good_lp) Mixed Integer Linear Programming for Rust, with an user-friendly API. This crate allows modeling LP problems, and lets you solve them with various solvers. 189 | - [Axiom Profiler](https://github.com/viperproject/axiom-profiler) A tool for visualising, analysing and understanding quantifier instantiations made via E-matching in a run of an SMT solver 190 | - [[2017][PDF] Counterexample Guided Inductive Optimization based on Satisfiability Modulo Theories](https://ssvlab.github.io/lucasccordeiro/papers/jscp2017_2.pdf) 191 | 192 | ## CLI 193 | 194 | - [`structopt`](https://crates.io/crates/structopt) Parse command line arguments by defining a struct 195 | - [`clap`](https://crates.io/crates/clap) A simple to use, efficient, and full-featured Command Line Argument Parser 196 | - [`pico-args`](https://crates.io/crates/pico-args) An ultra simple CLI arguments parser 197 | - [`argh`](https://crates.io/crates/argh) A derive-based argument parser optimized for code size 198 | 199 | ### Configuration 200 | 201 | - [`etcetera`](https://crates.io/crates/etcetera) A 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 choice 202 | - [`toml`](https://crates.io/crates/toml) A TOML decoder and encoder for Rust (optionally uses [serde]) 203 | - [`envy`](https://crates.io/crates/envy) Deserialize environment variables into typesafe structs (uses [serde]) 204 | 205 | ## Repl 206 | 207 | - [`rustyline`](https://crates.io/crates/rustyline) Rustyline, a readline implementation based on Antirez's Linenoise 208 | - [`repl-rs`](https://crates.io/crates/repl-rs) Library to generate a REPL for your application 209 | - [`termwiz`](https://crates.io/crates/termwiz) Terminal Wizardry for Unix and Windows 210 | 211 | ## String handling 212 | 213 | - [`beef`](https://crates.io/crates/beef) Faster, more compact implementation of [`Cow`](https://doc.rust-lang.org/alloc/borrow/enum.Cow.html). 214 | - [`smol_str`](https://crates.io/crates/smol_str) Small-string optimized string type with O(1) clone 215 | - [`smallstring`](https://crates.io/crates/smallstring) 'Small string' optimization: store small strings on the stack using smallvec 216 | - [`heck`](https://crates.io/crates/heck) Heck 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 performing 217 | - [`ropey`](https://crates.io/crates/ropey) Ropey 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. 218 | 219 | ## Syntax trees 220 | 221 | - [`rowan`](https://crates.io/crates/rowan) Generic lossless syntax trees 222 | - [`cstree`](https://crates.io/crates/cstree) A fork of `rowan` with threadsafe syntax trees and built-in [source string interning](#string-interning) 223 | 224 | ## Pretty printing 225 | 226 | - [`pretty`](https://crates.io/crates/pretty) Wadler-style pretty-printing combinators in Rust 227 | 228 | ## Variable binding 229 | 230 | - [`moniker`](https://crates.io/crates/moniker) An automagical variable binding library for tracking variables in scopes 231 | 232 | ## Caching 233 | 234 | - [`cached`](https://crates.io/crates/cached) Caching structures and simplified function memoization 235 | 236 | ## WASM 237 | 238 | - [`wain`](https://crates.io/crates/wain) WebAssembly interpreter written in Safe Rust with zero dependencies 239 | - [`wasmer`](https://crates.io/crates/wasmer) The high-level public API of the Wasmer WebAssembly runtime 240 | - [`wasmtime`](https://crates.io/crates/wasmtime) High-level API to expose the Wasmtime runtime 241 | - [`wasmtime-jit`](https://crates.io/crates/wasmtime-jit) JIT-style execution for WebAsssembly code in Cranelift 242 | - [`wasmlite-parser`](https://crates.io/crates/wasmlite-parser) This crate parses WebAssembly modules and can generate LLVM IR based the data extracted from a module 243 | - [`parity-wasm-cp`](https://crates.io/crates/parity-wasm-cp) WebAssembly binary format serialization/deserialization/interpreter 244 | - [`substrate-wasm-builder`](https://crates.io/crates/substrate-wasm-builder) A utility for building WASM binaries 245 | - [`walrus`](https://crates.io/crates/walrus) A library for performing WebAssembly transformations 246 | 247 | ## Logging 248 | 249 | - [`tracing`](https://crates.io/crates/tracing) Application-level tracing for Rust 250 | - [`tracing-tree`](https://crates.io/crates/tracing-tree) A Tracing Layer which prints a tree of spans and events. 251 | - [`tracing-forest`](https://crates.io/crates/tracing-forest) Preserving contextual coherence among trace data from concurrent tasks 252 | - [`tracing-timing`](https://crates.io/crates/tracing-timing) Inter-event timing metrics on top of `tracing` 253 | - [`tracing-coz`](https://crates.io/crates/tracing-coz) Rust-tracing support for the [coz](https://github.com/plasma-umass/coz/#installation) Causal Profiler 254 | - [`tracing-flame`](https://crates.io/crates/tracing-flame) A tracing `Layer` for generating a folded stack trace for generating flamegraphs and flamecharts with inferno 255 | - [`test-env-log`](https://crates.io/crates/test-env-log) A crate that takes care of automatically initializing logging and/or tracing for Rust tests. 256 | - [`tracing-unwrap`](https://crates.io/crates/tracing-unwrap) This crate provides `.unwrap_or_log()` and `.expect_or_log()` methods on `Result` and `Option` types that log failed unwraps to a `tracing::Subscriber` 257 | - [`log`](https://crates.io/crates/log) A Rust library providing a lightweight logging facade 258 | - [`slog`](https://crates.io/crates/slog) An ecosystem of reusable components for structured, extensible, composable and contextual logging for Rust 259 | 260 | ## Storage 261 | 262 | - [`slotmap`](https://crates.io/crates/slotmap) Containers with persistent unique keys to access stored values: Insertion, deletion and access all take O(1) time with low overhead. 263 | - [`indexmap`](https://crates.io/crates/indexmap) A hash table with consistent order and fast iteration 264 | - [`vecmap`](https://crates.io/crates/vecmap) Vec-based Map and Set data structures 265 | 266 | ### Disjoint-sets 267 | 268 | - [`union-find`](https://crates.io/crates/union-find) Struct and methods for union-find operation 269 | - [`ena`](https://crates.io/crates/ena) An implementation of union-find in Rust; extracted from (and used by) rustc 270 | 271 | ## Incremental Analysis 272 | 273 | - [`timely`](https://crates.io/crates/timely) A low-latency cyclic dataflow computational model, introduced in the paper [Naiad: a timely dataflow system](https://dl.acm.org/doi/10.1145/2517349.2522738) 274 | - [`differential-dataflow`](https://crates.io/crates/differential-dataflow) A 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](https://github.com/timelydataflow/differential-dataflow/blob/master/differentialdataflow.pdf) over [timely dataflow](https://github.com/timelydataflow/timely-dataflow) on Rust. 275 | - [`dogsdogsdogs`](https://github.com/TimelyDataflow/differential-dataflow/tree/master/dogsdogsdogs) Worst-case optimal joins and delta queries in differential dataflow 276 | - [`dataflow-join`](https://github.com/frankmcsherry/dataflow-join) A streaming implementation of Ngo et al's `GenericJoin` in timely dataflow 277 | - [`timely-sort`](https://github.com/TimelyDataflow/timely-dataflow/tree/master/sort) An cache-aware implementation of radix sort in Rust 278 | - [`diagnostics`](https://github.com/TimelyDataflow/diagnostics) Diagnostic tools for [`timely-datafflow`](https://crates.io/crates/timely) and [`differential-dataflow`](https://crates.io/crates/differential-dataflow) computations 279 | - [`differential-datalog`](https://github.com/vmware/differential-datalog) A programming language for incremental computation based on [`timely-dataflow`](https://crates.io/crates/timely) and [`differential-dataflow`](https://crates.io/crates/differential-dataflow), similar to [`IncA`](https://github.com/szabta89/IncA) or [`Souffle`](https://github.com/souffle-lang/souffle) 280 | 281 | ### Timely Dataflow Resources 282 | 283 | - [Naiad: a timely dataflow system](https://dl.acm.org/doi/10.1145/2517349.2522738) 284 | - [Timely Dataflow Book](https://timelydataflow.github.io/timely-dataflow/) 285 | - [Differential Dataflow](https://github.com/timelydataflow/differential-dataflow/blob/master/differentialdataflow.pdf) 286 | - [Differential Dataflow Book](https://timelydataflow.github.io/differential-dataflow/) 287 | - Sudoku in Differential Dataflow: [blog](https://github.com/frankmcsherry/blog/blob/master/posts/2020-06-06.md#sudoku-in-differential-dataflow), [video series](https://www.youtube.com/watch?v=DR5V5bNpclg) 288 | - An introduction to Timely Dataflow: [part 1](https://github.com/frankmcsherry/blog/blob/master/posts/2015-09-14.md), [part 2](https://github.com/frankmcsherry/blog/blob/master/posts/2015-09-18.md), [part 3](https://github.com/frankmcsherry/blog/blob/master/posts/2015-09-21.md) 289 | - An introduction to Differential Dataflow: [part 1](https://github.com/frankmcsherry/blog/blob/master/posts/2015-09-29.md), [part 2](https://github.com/frankmcsherry/blog/blob/master/posts/2015-11-27.md) 290 | - [Differential Dataflow meets Calculus](https://github.com/frankmcsherry/blog/blob/master/posts/2020-02-15.md) 291 | 292 | ## Fuzzing 293 | 294 | - [`honggfuzz-rs`](https://crates.io/crates/honggfuzz) Honggfuzz is a security oriented fuzzer with powerful analysis options that supports evolutionary, feedback-driven fuzzing based on code coverage 295 | - [`cargo-fuzz`](https://crates.io/crates/cargo-fuzz) A cargo subcommand for using libFuzzer 296 | - [`libfuzzer-sys`](https://crates.io/crates/libfuzzer-sys) Barebones wrapper around LLVM's libFuzzer runtime library 297 | - [`wasm-smith`](https://crates.io/crates/wasm-smith) A WebAssembly test case generator 298 | - [`fuzzcheck`](https://crates.io/crates/fuzzcheck) A structure-aware coverage-guided fuzzer 299 | - [`libafl`](https://crates.io/crates/libafl) 300 | - [`test-fuzz`](https://github.com/trailofbits/test-fuzz) 301 | 302 | ### Fuzzing Resources 303 | 304 | - [Fuzzing a parser](https://arzg.github.io/lang/20/) 305 | - [Rust Fuzz Book](https://rust-fuzz.github.io/book/cargo-fuzz.html) 306 | - [Fuzzcheck guide](https://fuzzcheck.neocities.org/) 307 | - [The Fuzzing Book](https://www.fuzzingbook.org/) 308 | - [LibAFL guide](https://aflplus.plus/libafl-book/) 309 | 310 | ## Graphs 311 | 312 | - [`egg`](https://crates.io/crates/egg) Egg is a flexible, high-performance e-graph library 313 | - [Herbie](https://github.com/uwplse/herbie)'s usage of `egg` to improve the accuracy of floating point calculations ([language](https://github.com/uwplse/herbie/blob/4adbd48b01b8a4c382af2bf60556b8be0fabcf70/egg-herbie/src/math.rs#L43-L66), [rules](https://github.com/uwplse/herbie/blob/4adbd48b01b8a4c382af2bf60556b8be0fabcf70/egg-herbie/src/rules.rs#L17-L934), [analysis](https://github.com/uwplse/herbie/blob/4adbd48b01b8a4c382af2bf60556b8be0fabcf70/egg-herbie/src/math.rs#L68-L196)) 314 | - [Szalinski](https://github.com/uwplse/szalinski)'s usage of `egg` to simplify CAD programs ([language](https://github.com/uwplse/szalinski/blob/66dac92f8a77e7d77a604bc4fceee6590966d3ac/src/cad.rs#L55-L105), [rules](https://github.com/uwplse/szalinski/blob/08218dee8deb789d9de4cdaa2c83c276a0cca5fe/src/rules.rs#L43-L413), [appliers](https://github.com/uwplse/szalinski/blob/08218dee8deb789d9de4cdaa2c83c276a0cca5fe/src/rules.rs#L436-L899)) 315 | - [Glenside](https://github.com/gussmith23/glenside)'s usage of `egg` for optimizing tensor programs ([language](https://github.com/gussmith23/glenside/blob/11a06375b9d91a7f66bddb2f16a8e866be8cd9c4/src/language/language.rs#L11-L296), [rules](https://github.com/gussmith23/glenside/blob/11a06375b9d91a7f66bddb2f16a8e866be8cd9c4/src/language/rewrites.rs), [analysis](https://github.com/gussmith23/glenside/blob/11a06375b9d91a7f66bddb2f16a8e866be8cd9c4/src/language/language.rs#L1066-L2982)) 316 | - [`petgraph`](https://crates.io/crates/petgraph) A graph data structure library. Provides graph types and graph algorithms 317 | - [`timely`](https://crates.io/crates/timely) A low-latency cyclic dataflow computational model, introduced in the paper [Naiad: a timely dataflow system](https://dl.acm.org/doi/10.1145/2517349.2522738) 318 | - [`differential-dataflow`](https://crates.io/crates/differential-dataflow) A 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](https://github.com/timelydataflow/differential-dataflow/blob/master/differentialdataflow.pdf) over [timely dataflow](https://github.com/timelydataflow/timely-dataflow) on Rust. 319 | 320 | ## Type Checking 321 | 322 | - [`rusttyc`](https://crates.io/crates/rusttyc) An interface that allows for an intuitive translation of inference rules based on a Hindney-Milner-like bounded type meet-semilattice into rust code 323 | - [`polytype`](https://crates.io/crates/polytype) A Hindley-Milner polymorphic typing system 324 | 325 | ## Peephole Optimization 326 | 327 | - [`egg`](https://crates.io/crates/egg) Egg is a flexible, high-performance e-graph library 328 | - [`peepmatic`](https://crates.io/crates/peepmatic) A DSL for peephole optimizations and compiler for generating peephole optimizers from them 329 | 330 | ## Garbage Collection 331 | 332 | - [`broom`](https://crates.io/crates/broom) An ergonomic tracing garbage collector that supports mark 'n sweep garbage collection 333 | - [`gc`](https://crates.io/crates/gc) A simple tracing (mark and sweep) garbage collector for Rust 334 | - [`shredder`](https://crates.io/crates/shredder) Garbage collection as a library for Rust 335 | - [`comet`](https://crates.io/crates/comet-gc) A garbage collection library for implementing VMs in Rust 336 | - [`mmtk`](https://docs.rs/mmtk/latest/mmtk/) Memory Management ToolKit (MMTk) for portable & efficient memory management in language VMs 337 | 338 | ## Guides & Resources 339 | 340 | - [Making a language in Rust](https://arzg.github.io/lang/) A series about making a programming language called Eldiro using the Rust programming language 341 | - [Crafting Interpreters](https://craftinginterpreters.com/welcome.html) Implementing everything from parsing to garbage collection to bytecode VMs, highly reccomended as an introduction to language development ([Homepage](https://craftinginterpreters.com)) 342 | - [Create Your Own Programming Language with Rust](https://createlang.rs/) 343 | - [Where to Start Hand-Writing a Parser (in Rust)](https://domenicquirl.github.io/blog/parsing-basics/) 344 | - [Writing a simple parser in Rust](https://adriann.github.io/rust_parser.html) 345 | - GC and Rust [part 0](http://blog.pnkfx.org/blog/2015/10/27/gc-and-rust-part-0-how-does-gc-work/), [part 1](http://blog.pnkfx.org/blog/2015/11/10/gc-and-rust-part-1-specing-the-problem/) and [part 2](http://blog.pnkfx.org/blog/2016/01/01/gc-and-rust-part-2-roots-of-the-problem/) 346 | - Matklad on pratt parsing: [Simple but Powerful Pratt Parsing](https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html) and [From Pratt to Dikjstra](https://matklad.github.io/2020/04/15/from-pratt-to-dijkstra.html) 347 | - [Pure AST based linting sucks](https://rdambrosio016.github.io/rust/2020/09/18/pure-ast-based-linting-sucks.html) 348 | - [LLVM's Kaleidoscope in Rust](https://github.com/jauhien/iron-kaleidoscope) The Kaleidoscope Language tutorial, showing how to implement a simple language using LLVM in Rust 349 | - [Where to Start Hand-Writing a Parser (in Rust) ](https://domenicquirl.github.io/blog/parsing-basics/) An introduction to programming language parsing in which we hand-write a parser and run it on some real input 350 | - [x86 and amd64 instruction reference](https://www.felixcloutier.com/x86/) 351 | - [X86 Opcode and Instruction Reference](http://ref.x86asm.net/index.html) 352 | - [Linear Scan Register Allocation on SSA Form](https://c9x.me/compile/bib/Wimmer10a.pdf) 353 | - [A bibliography of papers related to symbolic execution](https://github.com/saswatanand/symexbib) 354 | - [Instruction Latencies, Throughput and Micro-Operation Breakdowns for Intel, AMD and VIA CPUs](https://www.agner.org/optimize/instruction_tables.pdf) 355 | - [[1995][PDF] Symbolic Range Propagation](https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.30.4717) 356 | - [[2001][PDF] Efficient Symbolic Analysis for Optimizing Compilers](https://www.cs.fsu.edu/~engelen/cc01.pdf) 357 | - [[2021][Video] A New Approach to Removing Redundant Conditions in LLVM](https://www.youtube.com/watch?v=1hm5ZVmBEvo) 358 | - [[2017][Video] Polyhedral Value & Memory Analysis](https://www.youtube.com/watch?v=xSA0XLYJ-G0) 359 | - [Simplify: A Theorem Prover for Program Checking](https://www.hpl.hp.com/techreports/2003/HPL-2003-148.pdf) 360 | - [Elegant and performant recursion in Rust](https://recursion.wtf/posts/rust_schemes/) 361 | - [Speculation in JavaScriptCore](https://webkit.org/blog/10308/speculation-in-javascriptcore/) 362 | - [Whippet: A new GC for Guile](https://wingolog.org/archives/2023/02/07/whippet-towards-a-new-local-maximum) 363 | 364 | ### Type Checking 365 | 366 | - [Type Checking in less than 100 lines of Rust](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a15a24394c145e4e02afa3b48bb51ea1) (Credit to [@zesterer](https://github.com/zesterer)) 367 | - [Bidirectional Type Checking in ~200 lines of OCaml](https://gist.github.com/mb64/87ac275c327ea923a8d587df7863d8c7) (Written in OCaml, credit to [@mb64](https://github.com/mb64)) 368 | - [[2020][PDF] Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism](https://arxiv.org/abs/1306.6032) 369 | - [Implementation of "Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism"](https://github.com/segeljakt/BidirectionalTypechecking) (Written in Rust, from [@segeljakt](https://github.com/segeljakt)) 370 | - [Implementation of "Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism"](https://github.com/JDemler/BidirectionalTypechecking) (Written in Rust, from [@JDemler](https://github.com/JDemler)) 371 | - [A bidirectional type inference system loosely based on Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism.](https://github.com/samuela/bidirectional-typing) (Written in Haskell) 372 | - [Didactic implementation of the type checker described in "Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism"](https://github.com/soren-n/bidi-higher-rank-poly) (Written in OCaml) 373 | - [An implementation of a predicative polymorphic language with bidirectional type inference and algebraic data types](https://github.com/zehaochen19/vanilla-lang) (Written in Haskell) 374 | 375 | ### Inlining 376 | 377 | - [Inlining Decisions in Visual Studio](https://devblogs.microsoft.com/cppblog/inlining-decisions-in-visual-studio/) 378 | - [C++ Inliner Improvements: The Zipliner](https://devblogs.microsoft.com/cppblog/c-inliner-improvements-the-zipliner/) 379 | - [John Carmack on Inlined Code](https://collincode.wordpress.com/2016/07/19/john-carmack-on-inlined-code/) 380 | - [How RyuJIT inlines a function (heuristics)](https://web.archive.org/web/20210517175814/https://egorbo.com/how-inlining-works.html) 381 | - [Smarter C/C++ inlining with attribute((flatten))](https://awesomekling.github.io/Smarter-C++-inlining-with-attribute-flatten/) 382 | - [Do compilers take inline as a hint?](https://blog.tartanllama.xyz/inline-hints/) 383 | - [cmd/compile: improve inlining cost model](https://github.com/golang/go/issues/17566) 384 | - [What does 'inline' mean?](https://forum.dlang.org/thread/mailman.3723.1591596899.31109.digitalmars-d@puremagic.com) 385 | - [Zebu VM check_should_inline_func()](https://gitlab.anu.edu.au/mu/mu-impl-fast/-/blob/6572fe39ae65e424bdaf612f461fe60c8fc0b95f/src/compiler/passes/inlining.rs#L89) 386 | - [Warp: Improved JS performance in Firefox 83](https://hacks.mozilla.org/2020/11/warp-improved-js-performance-in-firefox-83/) 387 | - [When Short Methods Pay Off: JIT Inlining](https://dzone.com/articles/jit-inlining) 388 | - [cross-module inlining in guile -- wingolog](https://wingolog.org/archives/2021/05/13/cross-module-inlining-in-guile) 389 | - [Inline In Rust](https://matklad.github.io//2021/07/09/inline-in-rust.html) 390 | - [It’s Not Always iCache](https://matklad.github.io/2021/07/10/its-not-always-icache.html) 391 | - [[2003][PDF] Adaptive Online Context-Sensitive Inlining](http://www.cs.cmu.edu/afs/cs/academic/class/15745-s07/www/papers/hazelwood-cgo03.pdf) 392 | - [[2003][PDF] To Inline or Not to Inline. Enhanced Inlining Decisions](https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.6.946&rep=rep1&type=pdf) 393 | - [[2004][PDF] Fast and Effective Procedure Inlining](https://guenchi.github.io/Scheme/doc/Fast%20and%20Effective%20Procedure%20Inlining.pdf) 394 | - [[2016][PDF] CSE P 501 - Compilers. Inlining and Devirtualization](https://courses.cs.washington.edu/courses/csep501/18sp/lectures/X1-inlining.pdf) 395 | - [[2017][PDF] TurboFan Inlining Heuristics](https://docs.google.com/document/d/1VoYBhpDhJC4VlqMXCKvae-8IGuheBGxy32EOgC2LnT8/edit) 396 | - [[2019][PDF] Guiding Inlining Decisions Using Post-Inlining Transformations](https://webdocs.cs.ualberta.ca/~amaral/thesis/ErickOchoaMSc.pdf) 397 | - [[2019][PDF] An Optimization-Driven Incremental Inline Substitution Algorithm for Just-in-Time Compilers](http://aleksandar-prokopec.com/resources/docs/prio-inliner-final.pdf) 398 | - [[2021][PDF] Inlining for Code Size Reduction](https://homepages.dcc.ufmg.br/~fernando/publications/papers/SBLP21Pacheco.pdf) 399 | 400 | ### RVSDG 401 | 402 | - [[2020][PDF] RVSDG: An Intermediate Representation for Optimizing Compilers](https://www.sjalander.com/research/pdf/sjalander-tecs2020.pdf) 403 | - [[2018][PDF] RVSDG: An Intermediate Representation for the Multi-Core Era](https://www.sjalander.com/research/pdf/sjalander-mcc2018.pdf) 404 | - [[2015][PDF] Perfect Reconstructability of Control Flow from Demand Dependence Graphs](https://dl.acm.org/doi/10.1145/2693261) 405 | - [Principles, Techniques, and Tools for Explicit and Automatic Parallelization](https://www.researchgate.net/publication/332241231_Principles_Techniques_and_Tools_for_Explicit_and_Automatic_Parallelization) 406 | - [[Slides] Compiling with the Regionalized Value State Dependence Graph](https://www.sintef.no/contentassets/11da6d67207348db98a30ddbdf3b0bba/reissmann_poster.pdf) 407 | - [JLM RVSDG Implementation (C++)](https://github.com/phate/jlm) 408 | - [JIVE RVSDG Graph Implementation (C++)](https://github.com/phate/jive/tree/master) 409 | - [RVSDG Viewer (C++)](https://github.com/phate/rvsdg-viewer) 410 | - [Cranial Coitus RVSDG Brainfuck Optimizer (Rust)](https://github.com/Kixiron/cranial-coitus) 411 | - [[2018][PDF] Semantic Reasoning About the Sea of Nodes](https://hal.inria.fr/hal-01723236/file/sea-of-nodes-hal.pdf) 412 | - [[1994][PDF] Value dependence graphs: representation without taxation](https://dl.acm.org/doi/10.1145/174675.177907) 413 | - [[2016][PDF] Value State Flow Graph: A Dataflow Compiler IR for Accelerating Control-Intensive Code in Spatial Hardware](https://dl.acm.org/doi/abs/10.1145/2807702) 414 | - [Numba Python JIT RVSDG Optimizer](https://github.com/numba/numba-rvsdg) 415 | - [[Archived] Rain IR](https://gitlab.com/old-rain-lang/rain-ir) A dependently-typed RVSDG with liftetimes, implemented in Rust 416 | 417 | ### Equality Saturation 418 | 419 | - [[2010][PDF] Equality Saturation: A New Approach to Optimization](https://arxiv.org/abs/1012.1802) 420 | - [[2020][PDF] egg: Fast and Extensible Equality Saturation](https://arxiv.org/abs/2004.03082) 421 | - [[2021][PDF] Rewrite Rule Inference Using Equality Saturation](https://arxiv.org/abs/2108.10436) 422 | - [[2021][PDF] Sketch-Guided Equality Saturation: Scaling Equality Saturation to Complex Optimizations in Languages with Bindings](https://arxiv.org/abs/2111.13040) 423 | - [[2021][PDF] Caviar: An E-graph Based TRS for Automatic Code Optimization](https://arxiv.org/abs/2111.12116) 424 | - [[2002][PDF] SPORES: Sum-Product Optimization via Relational Equality Saturation for Large Scale Linear Algebra](https://arxiv.org/abs/2002.07951) 425 | - [[2021][PDF] Relational E-Matching](https://arxiv.org/abs/2108.02290) 426 | - [[2021][PDF] Rewrite Rule Inference Using Equality Saturation](https://arxiv.org/abs/2108.10436) 427 | 428 | ## Uncategorized 429 | 430 | - [Turns are Better than Radians](https://www.computerenhance.com/p/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 431 | - [Algorithms for Modern Hardware](https://en.algorithmica.org/hpc/) ([russian version](https://ru.algorithmica.org/)) Low-level performance tuning for modern hardware 432 | 433 | [serde]: https://crates.io/crates/serde 434 | --------------------------------------------------------------------------------