Static Analyzer Migration to Rust
How we migrated our static analyzer from Java to Rust | Datadog

How we migrated our static analyzer from Java to Rust | Datadog

5/23/2024 · Julien Delange, Kassen Qian, Rosa Trieu

What this post added

This post details the technical migration of Datadog's static analyzer from Java to Rust. Key technical decisions included switching from ANTLR to Tree-sitter for AST generation, leveraging Tree-sitter's Rust bindings for improved performance and language support. The JavaScript runtime was migrated from GraalVM to Deno (via the deno-core crate) for security and efficiency. The post outlines the architectural changes, the benefits of Rust (performance, memory usage), and the team's experience learning Rust for the migration. It also details the mapping of Java libraries to their Rust equivalents for core functions like AST building, YAML parsing, HTTP client usage, and concurrent execution.

Read the original post ↗