# Aide: code-first API documentation for Rust services

> Aide is a Rust library for API documentation that stays attached to the code it describes, published on crates.io and documented on docs.rs. The repository is a Cargo workspace of several crates plus two Axum example services, and it leans on community projects for OpenAPI output.

**tamasfe/aide** — An API documentation library

- Repository: https://github.com/tamasfe/aide
- Stars: 679 · Forks: 107
- Language: Rust
- License: Apache-2.0
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/tamasfe-aide

## Aide attaches API documentation to the Rust code it describes

Aide is a set of Rust libraries for API documentation, described in its own documentation as code-first API documentation and other utility libraries for Rust. The phrase code-first carries the design. Instead of asking you to keep a separate description of your endpoints alongside the implementation, aide lets the documentation live in the Rust types and functions themselves, so the two cannot drift apart the way a standalone schema file can. That is also why the project points readers at the published API documentation on docs.rs rather than at a long tutorial: the reference for the library is the generated API surface, and the README acts as a short hub. The crate is distributed through crates.io, and the repository keeps two example services that show the library in use inside an HTTP application. The intended audience is Rust developers who expose an API and want the request and response shapes to be described in code rather than in a separate document that nobody updates.

## The repository is a Cargo workspace of crates plus two Axum examples

The top-level Cargo.toml is a workspace manifest, and it is short enough to read in one glance:

```toml
[workspace]
members = ["crates/*", "examples/*"]
resolver = "2"
```

Two things follow from those three lines. The library is split across several crates under crates/ rather than shipped as one package, which is the usual way a Rust project separates a core from optional pieces, and the examples directory is part of the same workspace, so the example services are compiled and checked alongside the library rather than being loose scripts. The example directories are named example-axum and example-axum-worker, which tells you the target framework is Axum and that both a plain server and a worker-style deployment are covered. The rest of the tree is small and conventional: a CONTRIBUTING.md for contributions, a .typos.toml for spelling checks, and two licence files at the root. The documentation does not enumerate the individual crates inside crates/, so the exact feature breakdown is something you have to read from the source tree or from the crate list on crates.io.

## Community projects show where aide is meant to be extended

The README keeps a section titled a community maintained aide ecosystem, and the two entries there describe different kinds of extension. The first, aide-axum-typed-multipart-2, is a wrapper around the axum_typed_multipart crate whose purpose is to generate documentation for multipart requests, which is the kind of request handling that is easy to leave out of an API description. The second, rovo, provides doc-comment-driven OpenAPI documentation generation for Axum web applications and is built on top of aide. Both are useful signals about the shape of the core library. Aide appears to expose the pieces a documentation backend needs, while the OpenAPI and multipart specifics are supplied by separate crates rather than baked in. That is a deliberate division of labour and it keeps the core smaller, but it also means that if you want OpenAPI output you are depending on a community crate whose maintenance is not controlled by the aide repository. The README asks projects that are not listed to open a pull request, so the ecosystem list is meant to grow.

## The project names its alternatives but does not compare them

The README closes with a section on similar libraries and lists three alternatives for readers who want something else: paperclip, utoipa and okapi. That honesty is worth something, because it means you are not locked into aide by a page that pretends there is no other way. What the documentation does not do is explain how the approaches differ, and no feature comparison is provided. The distinction you can draw from the aide documentation itself is architectural: aide is a set of libraries you depend on and call, with the documentation attached to your own Rust types, and the OpenAPI layer is something you add on top through rovo. If you want an API description that exists independently of your implementation and can be reviewed as a contract by people who do not read Rust, the alternatives listed in the README are the place to look. If you want the description to be impossible to forget because it fails to compile when it goes stale, that is the case aide is built for.

## Dual MIT and Apache-2.0 licensing, and where the tags stand

The repository states that all code in it is dual licensed under MIT and Apache-2.0, and the tree carries both LICENSE-MIT and LICENSE-Apache at the root. A dual licence of this kind lets you pick whichever of the two terms suits your organisation, which is generally the simplest licensing position for a library that will sit inside commercial services. That is a factual note about the terms, not legal advice on how to apply them. On releases, the tagged versions are v0.15.1 and v0.15.0, both dated 2025-08-19, with v0.14.0 dated 2025-01-12 before them. The repository is not archived and the last push was on 2026-09-21, so commits continued after the most recent tag. The version in use is also visible from the crates.io badge in the documentation. If you pin a dependency, the tag list is what you pin against, and you can see that the published crate line and the commit history are not on the same schedule.

## Getting started means reading docs.rs, not running a command

There is no installation command in the aide documentation. The package is published on crates.io as aide, and the API reference is generated at docs.rs, so those two places are where the project says to get the code and read the API. Because no dependency snippet is given, the practical starting move is to add the crate to your own Cargo.toml by name and then read the crate documentation for the version you resolved. The example projects in the repository are the second source of truth: example-axum and example-axum-worker show a working service, and since both sit in the same workspace as the library you can read them as ordinary Rust source. The README itself is a hub rather than a guide, with four sections covering the community ecosystem, contributing, licensing and similar libraries. Contributions are directed to CONTRIBUTING.md, and the spelling configuration in .typos.toml shows that text hygiene in the docs is treated as part of the build rather than an afterthought.

## What the documentation leaves you to work out yourself

Several things a would-be user would want are simply absent, and naming them is more useful than guessing at them. There is no feature list for the crates under crates/, so you cannot tell from the repository root which optional pieces exist. There is no configuration example, no environment variable documentation and no statement of the minimum supported Rust version. The documentation also does not describe how the library chooses a documentation format or how you register handlers with it, since that detail lives in the generated API reference on docs.rs and in the examples. Aide is described as covering API documentation and other utility libraries, and the README does not enumerate what those utilities are. If your evaluation depends on those specifics, the two example services and the docs.rs pages for the exact crate version are the places to look, rather than the README.

## Conclusion

Aide fits teams building Rust HTTP APIs that want their documentation written in the same files as the handlers, especially Axum users who can add rovo for OpenAPI output. It will not help you if you need a standalone schema-first contract, since the project names paperclip, utoipa and okapi as the alternatives for that taste. Before adopting it, read the crate list under crates/ in the workspace and confirm the API surface you need is published on docs.rs, because the README carries no feature table and no install command of its own.

## FAQ

### What is aide used for in Rust projects?

Aide is described as code-first API documentation and other utility libraries for Rust, with the crate published on crates.io and its API reference generated on docs.rs. The documentation stays attached to the Rust code rather than living in a separate description file.

### How do I add aide to a Rust project?

The documentation gives no installation command, so you add the crate named aide to your Cargo.toml dependencies yourself. The API documentation for the version you resolved is at docs.rs, and the repository ships example-axum and example-axum-worker as working examples.

### How do I generate OpenAPI documentation with aide?

The community project rovo provides doc-comment-driven OpenAPI documentation generation for Axum web applications and is built on top of aide. Aide itself is described as a code-first API documentation library, and the README does not state that it emits OpenAPI on its own.

### What licence does aide use?

The repository states that all code in it is dual licensed under MIT and Apache-2.0, and the root of the tree holds both LICENSE-MIT and LICENSE-Apache. The crates.io listing for the package shows the Apache-2.0 identifier.

## Sources

- [Issues](https://github.com/tamasfe/aide/issues)
- [License: Apache-2.0](https://github.com/tamasfe/aide/blob/main/LICENSE)
- [README](https://github.com/tamasfe/aide/blob/main/README.md)
- [Releases](https://github.com/tamasfe/aide/releases)
- [tamasfe/aide on GitHub](https://github.com/tamasfe/aide)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/tamasfe-aide
