Wright AI
DocsStart free
Rust · rustdoc

Auto-generate Rust rustdoc comments with AI

Wright AI writes rustdoc-style `///` comments for undocumented Rust functions and structs — including Panics, Errors, and Examples sections — then catches drift when signatures change.

Start for free →pip install wright

See it in action

Before and after — rustdoc style

BEFORE
pub fn parse_connection_string(s: &str) -> Result<ConnectionConfig, ConfigError> {
    let parts: Vec<&str> = s.splitn(2, "://").collect();
    if parts.len() != 2 {
        return Err(ConfigError::MissingScheme);
    }
    let scheme = Scheme::try_from(parts[0])?;
    let rest = parts[1];
    ConnectionConfig::from_parts(scheme, rest)
}
AFTER — wright generate
/// Parses a connection string into a validated `ConnectionConfig`.
///
/// Expects the format `scheme://host[:port][/path][?query]`. The scheme
/// must be one of the variants supported by `Scheme` (see
/// [`Scheme::try_from`]).
///
/// # Errors
///
/// Returns `ConfigError::MissingScheme` if the input does not contain
/// `://`. Returns `ConfigError::UnknownScheme` if the scheme prefix is
/// not recognised. Propagates any error from `ConnectionConfig::from_parts`.
///
/// # Examples
///
/// ```
/// let cfg = parse_connection_string("postgres://localhost:5432/mydb")?;
/// assert_eq!(cfg.port(), Some(5432));
/// ```
pub fn parse_connection_string(s: &str) -> Result<ConnectionConfig, ConfigError> {

How it works

More than a docstring generator

Call graph context
Wright builds a dependency graph before generating. It reads what calls your Rust function and what it calls — so docs describe purpose, not just mechanics.
📊
Coverage tracking
Know the exact percentage of documented functions across every file. Set a minimum threshold and enforce it in CI.
🔍
Drift detection
When a function signature changes, Wright flags the stale docstring automatically — as a VS Code warning and a CI failure.
🔌
MCP for AI tools
Exposes your indexed docs to Claude Code, Cursor, and Copilot via MCP so they always have live context about your codebase.

Comparison

How Wright differs from alternatives

cargo doc
Renders existing rustdoc comments into HTML — does not write them for you.
rust-analyzer hints
Shows inlay hints for types and parameters inline. Does not generate doc comments.
ChatGPT / Claude (manual)
Generates one docstring at a time when asked. No batch mode, no coverage tracking, no CI gate.

Start documenting your Rust codebase

Free VS Code extension · CLI · GitHub Action · MCP server. No credit card required.

Get started free →Read the docs