# Gotham: a Rust web framework that bets on stability over features

> Gotham promises it will always target stable Rust, and the release history shows the cost of that promise: four published versions in three years, each one a careful dependency bump.

**gotham-rs/gotham** — A flexible web framework that promotes stability, safety, security and speed.

- Repository: https://github.com/gotham-rs/gotham
- Website: https://gotham.rs
- Stars: 2,313 · Forks: 128
- Language: Rust
- License: NOASSERTION
- Published: 2026-10-06 · Updated: 2026-10-06 · Language: en
- Canonical page: https://hysenlabs.com/projects/gotham-rs-gotham

## Four features, one of which is a promise about toolchains

Gotham's README lists its features as a numbered list of four, and the first one is about Rust versions rather than about HTTP. The claim is stability focused: all releases target stable Rust, this will never change, and to ensure future compatibility the project also runs automated builds against Rust beta and nightly releases.

That is unusual to state so plainly. Most Rust projects pick a policy quietly and revisit it when a dependency needs nightly. Gotham has made the policy a public commitment, and the consequence is that anything Gotham's dependency tree needs has to work on stable. Building on beta and nightly in CI then serves as an early warning system rather than as a dependency: if a nightly-only change would break the project, the nightly build shows up before stable adopts it.

The second feature is static typing, described as ensuring the application is correctly expressed at compile time. The third is async everything, built on Tokio, with Hyper providing the server layer over stringly typed HTTP. The fourth is a performance claim stated as a unit rather than a number: measure completed requests including the 99th percentile in microseconds. That is a benchmark shape, not a benchmark result, and the README does not print the figures.

The project describes itself as a flexible web framework that promotes stability, safety, security and speed. There are 2313 stars, 128 forks, 53 open issues, and the last push was 2026-09-26.

## A Cargo workspace where every example is a crate

The root Cargo.toml is the clearest picture of what Gotham is, and it takes an unusual approach: the examples are workspace members. The members list is grouped with comments: core crates first, then middleware, then a long block of examples that are not published. The core and middleware entries read like this:

```toml
"gotham",
"gotham_derive",
"misc/borrow_bag",

"middleware/template",
"middleware/diesel",
"middleware/jwt",
```

Then it continues with dozens of example crates: hello_world, hello_world_tls, hello_world_until and shared_state at the top, then two templating variants, one for Tera and one for Askama. After that come the routing examples split into introduction, http_verbs, scopes and associations, then path with introduction, globs and regex, then query_string, cookies, sessions with an introduction and a custom_data_type, headers, middleware with introduction, introduction_await and multiple_pipelines, into_response, and handlers.

So the learning path is compiled rather than described. Every concept in the framework has at least one crate that demonstrates it, and those crates are in the same resolver as the library, which means they get built when the library is built.

The workspace package metadata sets license to MIT/Apache-2.0 with homepage gotham.rs, and uses resolver = "2". The workspace dependency block is where you can see the middleware versioning, which is not in lockstep with the core:

```toml
gotham = { path = "gotham", version = "0.8.1", default-features = false }
gotham_derive = { path = "gotham_derive", version = "0.8.1" }
gotham_middleware_diesel = { path = "middleware/diesel", version = "0.6.0" }
gotham_middleware_jwt = { path = "middleware/jwt", version = "0.9.0" }
borrow-bag = { path = "misc/borrow_bag", version = "1.1.1" }
```

Note the version spread: core at 0.8.1, Diesel middleware at 0.6.0, JWT middleware at 0.9.0. Those numbers are independent, which is the practical reason for the workspace layout. A middleware crate that does not need to move with the core does not have to.

## Middleware lives in its own crates, not in the core

There are three middleware packages in the tree: middleware/template, middleware/diesel and middleware/jwt. Keeping them separate rather than folding them into the core is a dependency decision, and it is one Gotham shares with most Rust web frameworks. A project that does not use Diesel should not have to resolve Diesel.

The template middleware is the one that is not versioned in the workspace dependency block above, which suggests it is used directly by the examples rather than depended on by the other members. The examples directory contains both a Tera and an Askama variant, which is a deliberate choice to show that Gotham does not lock you into one template engine.

The examples list in the repository covers the rest of the surface: custom_service, finalizers, handlers, headers, into_response, middleware, path, query_string, routing, sessions, shared_state, static_assets, templating and websocket. Each of those names corresponds to a thing a web framework has to answer, and the fact that there is a directory for each one is more informative than a feature list.

finalizers and custom_service are the two names that hint at Gotham's design rather than at its ergonomics. A finalizer in Gotham is something attached to a response path that runs as the response is being produced, and custom_service appears to be about threading application services through handlers. Both point at the framework's answer to the dependency injection question, which is compile-time typed state rather than a runtime container.

The hello_world_until example is also worth a look if you want to see how the framework handles shutdown, since graceful shutdown is the sort of thing that only becomes visible in a real service.

## A release history where dependency bumps are the headlines

Only three releases appear in this repository, and their gap tells you more than any roadmap would. gotham-0.7.4 published 2024-04-17 with a single notable change, support for a configurable bufsize on FileHandler. gotham-0.8.0 published 2026-03-03, roughly two years later, and the changelog says it updates some dependencies, most notably hyper to 1.x. gotham-0.8.1 published 2026-07-25 and its entire changelog is that it updates syn to version 3.0.

A two-year gap between a patch release and a minor one is the single most important fact about this project. It is the direct cost of the stable-Rust-only policy combined with a Hyper 1.x upgrade, which touches every layer of the framework.

The release notes also show how Gotham versions its crates, listing each published crate and its version under a Crates heading. The 0.8.0 release lists four: gotham 0.8.0, gotham_derive 0.8.0, gotham_middleware_diesel 0.6.0 and gotham_middleware_jwt 0.9.0. The 0.7.4 release listed only gotham itself, which says the middleware crates did not exist at that point in the workspace's current form.

Release tags are prefixed, so they read gotham-0.8.1 rather than v0.8.1, and each release links a full changelog compare URL.

For an adopter, the practical implication is that Gotham moves on Hyper's schedule rather than its own. If you are on 0.7.x, you are waiting for your own Hyper version to align before a migration is worth attempting, and there is no deprecation window to plan around.

## Dual licensing and an honest alternatives list

Gotham is licensed under your option of the MIT License or the Apache License, Version 2.0, with both files at the repository root. That is the standard Rust dual-licensing choice and it removes a question that comes up in some corporate reviews.

The alternatives section is worth reading closely because of how it is written. The README says the project acknowledges that sometimes the choices made for Gotham may not suit the needs of all projects, and if that is the case there are alternative Rust web frameworks to consider. It then lists five: Actix-Web, Conduit, Nickel, Rocket and Rouille, and points at arewewebyet.org for more.

That list is dated in a revealing way. Actix-Web and Rocket are the two names most Rust developers would still recognise as leading options today. Conduit and Rouille are considerably less active, and Nickel has moved in its own direction. Gotham is recommending competitors rather than claiming the field, which is a reasonable thing for a project whose differentiator is the toolchain policy rather than the feature set.

There is also a projects section listing one entry, a template for local GUIs with Seed and Gotham. One listed adopter is a signal in both directions: it shows the framework is used for something real, and it shows the audience is small and specific.

Community infrastructure follows the same shape. There is a Gitter chatroom, a Matrix room, a Twitter account, a code of conduct, a contributing guide, and a GitHub Actions badge for the Rust workflow. The Matrix room presence alongside Gitter suggests the project has been through at least one chat migration.

The website at gotham.rs is the learning hub, and the API documentation lives on docs.rs rather than in the repository.

## Conclusion

Gotham is a good choice when you want a typed Rust web framework that will not require chasing nightly toolchains, and a bad choice when you want the largest possible feature set or the fastest pace of release. The stable-Rust-only policy is the project's defining constraint and it shows up everywhere, including an explicit promise that this will never change and automated builds against beta and nightly to catch problems early. The workspace is genuinely modular, with separate crates for the core, derive macros, and three middleware packages for templates, Diesel and JWT, each versioned on its own schedule. The most recent release is gotham-0.8.1 from 2026-07-25, and the last push was 2026-09-26, so it is maintained on a slow cadence. Start with the examples directory, which carries a working hello world, routing, sessions and WebSocket setup, then read the API docs on docs.rs.

## FAQ

### What is the Gotham web framework written in?

Gotham is written in Rust and is published to crates.io as the `gotham` crate, with a companion `gotham_derive` crate for its macros. The workspace at the repository root also contains `gotham_middleware_diesel`, `gotham_middleware_jwt` and a template middleware crate, each versioned independently of the core.

### Does Gotham require a nightly Rust compiler?

No, and the README says so explicitly. All releases target stable Rust and states that this will never change. The project also runs automated builds against Rust beta and nightly so it learns about upcoming breakage early, without requiring contributors to run nightly themselves.

### What async runtime does Gotham use?

Tokio. The README credits Tokio for making all Gotham types async out of the box, with Hyper providing the server layer underneath. The workspace uses resolver = "2" and pins core crates by path plus version, which is how the middleware crates stay on independent schedules.

### How current is Gotham?

The most recent release in the repository is gotham-0.8.1, published 2026-07-25, which updated syn to version 3.0. The one before it, gotham-0.8.0 from 2026-03-03, moved hyper to 1.x. The gap back to gotham-0.7.4 in April 2024 shows the project moves on its dependencies' schedule rather than a fixed one.

### Where can I find working Gotham code?

The examples directory holds separate crates that are workspace members, so they compile alongside the library. Coverage includes hello_world, hello_world_tls, shared_state, routing with verbs and scopes, path globs and regex, cookies, sessions, middleware pipelines, into_response, handlers, static assets, templating for both Tera and Askama, and WebSocket support. API docs are on docs.rs.

## Sources

- [gotham-rs/gotham on GitHub](https://github.com/gotham-rs/gotham)
- [Issues](https://github.com/gotham-rs/gotham/issues)
- [Project website](https://gotham.rs)
- [README](https://github.com/gotham-rs/gotham/blob/main/README.md)
- [Releases](https://github.com/gotham-rs/gotham/releases)

---

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