Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Datadog Engineering 8 min read Case study mediumAdept

How we migrated our static analyzer from Java to Rust

Datadog rewrote the Codiga static analyzer from Java to Rust after switching its parser from ANTLR to Tree-sitter, whose Java bindings lacked features like pattern matching. The rewrite ran analysis about 3x faster with roughly 10x less memory, which matters on small CI runners. Shipping a single binary also removed the JVM dependency, so the same analyzer now runs inside the IDE. The team replaced GraalVM with deno-core as a sandboxed JavaScript rule runtime and mapped Java libraries to serde_yaml, reqwest and rayon. Learning Rust and migrating took about a month, helped by parity tests, clippy and rustfmt.

Assumes: abstract syntax treesstatic analysis basics

Related posts

  • Our Experience Porting the YJIT Ruby Compiler to Rust

    Shopify Engineering mediumAdept

    Shopify's YJIT team ported the CRuby JIT compiler from about 11,000 lines of C99 to Rust because C's lack of modules, generics, containers and safe macros made a growing compiler hard to manage. They translated it function by function without major redesign. Pattern matching, hygienic macros, Cargo features and string handling were clear wins. The pain points were concrete: offline builds without crates.io (they fell back to invoking rustc directly), bindgen silently failing on a large internal C API, verbose manual integer casting that discourages compact data layouts, and a cyclic control-flow graph where Rc/RefCell broke down, forcing manual memory management.

  • We Have to Start Over: From Atom to Zed

    Zed easyNovice

    Zed's co-founders explain why they abandoned Atom's Electron/JavaScript stack and rebuilt a code editor in Rust: JavaScript's pointer-chasing arrays, uncontrollable GC pauses, and the costly JS/C++ boundary for multithreading made performance work feel like fighting the platform. Rust's ownership model pushed them toward a copy-on-write B-tree (SumTree) rope built on Arc, letting snapshots move to background threads in O(1), and high-level Rust code cut a find-all-matches operation from 1s to 4ms. GPU rendering with custom shaders and signed distance fields came out of necessity after Pathfinder proved too slow. Owning the stack (Tree-sitter, GPUI) lets them change anything, such as adding WASM language extensions, at the cost of building more themselves.

  • Everything Is Broken: Shipping rust-minidump at Mozilla – Part 1

    Mozilla Hacks mediumAdept

    rust-minidump, a pure-Rust replacement for the minidump-processing half of Google Breakpad, has been Firefox's crash-processing backend for six months, running in about half the time of Breakpad and appearing more reliable. Part 1 covers what minidumps are and why Breakpad's permissive, multi-platform C++ parser became painful to maintain. It also explains why stackwalking over corrupted crash state is heuristic and error-prone. The bulk describes the testing strategy built before fuzzing exposed bugs: a synthetic minidump generator that deliberately shares no layout code with the parser, integration tests on real dumps, insta snapshot tests guarding the stable JSON output, and stackwalker unit tests.

  • Ruby 3.2’s YJIT is Production-Ready

    Shopify Engineering easyNovice

    YJIT, Shopify's JIT compiler for CRuby, became production-ready in Ruby 3.2 after a port from C99 to Rust and a cut in memory overhead to about a third of Ruby 3.1 levels. The memory savings came from smaller metadata, garbage collection of unused machine code and lazily allocated code pages. YJIT now runs about 38% faster than the 3.2 interpreter on railsbench and supports ARM64. Deployed across Shopify's entire Storefront Renderer, it delivers 5–10% end-to-end request speedups, and its fast compilation suits continuous deployment. Planned work targets memory footprint, faster method calls via a new calling convention and inlining, and a register allocator.

  • Translating Java to Kotlin at Scale

    Meta Engineering mediumAdept

    Meta is translating roughly ten million lines of Android Java to Kotlin using the Kotlinator, an automated pipeline built around a headless version of JetBrains' J2K. It runs six phases: a deep build, about 50 preprocessing steps, headless J2K, about 150 postprocessing steps, linters with autofixes, and fixes driven by compiler errors. A daily cron system produces the conversion diffs for human review. Null safety comes first, because Kotlin inserts runtime null checks at the Java interop boundary, so the Kotlinator errs toward nullable types to avoid introducing new NPEs. Meta is also working with JetBrains to add extension hooks to J2K for better symbol resolution and to open-source some of its steps.

The quest for software engineering knowledge.

Look:
Layout: