Luca Palmieri

Reasoning about Rust: an introduction to Rustdoc's JSON format

How do you statically analyze a Rust codebase without unstable compiler internals? Discover Rustdoc's JSON format, a stable API for building powerful developer tools.

Reasoning about Rust: an introduction to Rustdoc's JSON format
#1about 6 minutes

Reasoning about large-scale Rust projects

Large codebases introduce challenges in governance, architecture, and security that require automated tooling beyond standard linters.

#2about 6 minutes

The limitations of macros for static analysis

Procedural macros execute at compile-time but are limited because they operate on token streams without access to type information or a reflection API.

#3about 6 minutes

Using Rustdoc's JSON format for machine-readable APIs

Rustdoc can output a versioned JSON representation of a crate's public API, providing a stable, machine-parsable format for building custom tools.

#4about 3 minutes

Practical examples of tools using Rustdoc JSON

Explore tools like cargo-semver-checks, cargo-check-external-types, and the pavex framework that leverage Rustdoc JSON for tasks like versioning and dependency injection.

#5about 3 minutes

Limitations and future outlook for Rustdoc JSON

The format is not a silver bullet as it lacks function body information, but it represents a vital first step for building advanced meta-tooling for Rust.

#6about 4 minutes

Q&A on ecosystem integration and custom metadata

Discussion covers how Rustdoc JSON integrates into the CI toolchain and the current inability to add custom metadata attributes for project-specific tooling.

#7about 10 minutes

Q&A on adoption challenges and future improvements

Common pitfalls include linking data across crates, while future improvements may include stable identifiers, stabilization, and better multi-version support.

#8about 8 minutes

The origin of the 'Zero To Production in Rust' book

The book was created to bridge the gap between learning Rust syntax and building a complete, production-grade backend application.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.

Rust and GoLang

Rust and GoLang

NHe4a GmbH
Karlsruhe, Germany

Remote
55-65K
Intermediate
Senior
Go
Rust

Rust Developer

Hays Specialist Recruitment

Remote
C
GIT
Java
Bash
+3