Home/Rust
Rust · rustdoc

Rust rustdoc comments with AI
Auto-generated.

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 Freepip install wright
rustdoc
Doc styles supported
0
Config required
Free
No credit card

See it in action

Before and after — rustdoc style

Wright AI reads the function body, its callers, and its callees — generating documentation that reflects real intent, not just syntax.

BEFORE · undocumented
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])?;
    ConnectionConfig::from_parts(scheme, parts[1])
}
AFTER · wright generate
/// Parses a connection string into a validated `ConnectionConfig`.
///
/// # Errors
///
/// Returns `ConfigError::MissingScheme` if the input lacks `://`.
/// Returns `ConfigError::UnknownScheme` if the scheme is not recognised.
///
/// # Examples
///
/// ```
/// let cfg = parse_connection_string("postgres://localhost:5432/mydb")?;
/// ```
pub fn parse_connection_string(s: &str) -> Result<ConnectionConfig, ConfigError> {

How it works

More than a docstring generator.

WrightAI generates, verifies and maintains documentation — so docs stay accurate as your Rust codebase evolves.

Call-graph context
Wright builds a dependency graph before generating. It reads what calls your function and what it calls — so docs describe purpose, not just mechanics.
Coverage tracking
Know the exact % of documented functions across every file. Set a minimum threshold and enforce it in CI so coverage never regresses.
Drift detection
When a function signature changes, Wright flags the stale docstring — as a VS Code gutter warning and a CI failure. No more silent documentation lies.
MCP for AI tools
Exposes your indexed docs to Claude Code, Cursor, and Copilot via MCP so every AI response is grounded in live, verified codebase knowledge.

Comparison

How Wright differs from alternatives.

Most tools for Rust documentation either render what exists or suggest one comment at a time. Wright does neither.

cargo doc
gap

Renders existing rustdoc into HTML — does not write them for you.

rust-analyzer hints
gap

Shows inlay hints for types inline. Does not generate doc comments.

ChatGPT / Claude (manual)
gap

Generates one docstring at a time. No batch mode, no coverage tracking, no CI gate.

Wright AI
solves this

Batch-generates rustdoc documentation across your entire Rust codebase. Tracks coverage. Detects drift on every commit. Feeds live docs to AI tools via MCP. Free to start.

Documentation Intelligence Platform

Start documenting your Rust codebase.

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

Start FreeRead the Docs