mdBook

Open source

mdBook is a command line tool written in Rust that builds books and documentation sites from Markdown, with search and themes.

Open-source alternative to

rust-lang.github.io
mdBook homepage screenshot
GitHub stars
22k
Last 30 days
+77(+0%)
Last commit
yesterday
Repository age
11 years
Version
v0.5.4
Licence
MPL-2.0
Self-hosted
Yes

About mdBook

mdBook is a command line tool that creates books from Markdown. It is aimed at product or API documentation, tutorials, course materials and anything else that needs a clean, navigable presentation.

The output has integrated search and color syntax highlighting for code blocks in many languages. Theme files let you customize the formatting, preprocessors can add custom syntax or modify content, and backends can render the book to multiple formats. Rust code samples can be tested automatically.

It is written in Rust and used by the Rust programming language project for its own book. The source and documentation are released under the Mozilla Public License v2.0, and the documentation site shows version 0.5.4.

The documentation site itself is an example of what mdBook produces. It offers keyboard shortcuts for moving between chapters and searching, and several color themes: Light, Rust, Coal, Navy and Ayu. Contributions are handled on GitHub, where bugs and feature requests are posted on the issue tracker and the project relies on the community to fix bugs and add features.

Key features

  • Books written in lightweight Markdown
  • Integrated search and syntax highlighting
  • Customizable theme files
  • Preprocessors for custom syntax
  • Multiple output formats through backends
  • Automated testing of Rust code samples

Good fit for

  • API and product documentation
  • Tutorials and course materials
  • Rust project books
Built with
Rust tools
Tags
documentation
markdown
rust
static site
books
cli

mdBook: questions and answers

What is mdBook used for?
mdBook is a command line tool written in Rust that builds books and documentation sites from Markdown, with search and themes. It is a good fit for API and product documentation, tutorials and course materials, and Rust project books.
Is mdBook open source?
Yes. mdBook is open source under the MPL-2.0 licence. Its source code is on GitHub at rust-lang/mdBook and is written mainly in Rust.
Is mdBook free?
Yes. mdBook is open source, so the software itself is free to use.
Can I self-host mdBook?
Yes. mdBook can be self-hosted on your own server or infrastructure.
What is mdBook an alternative to?
mdBook is an open-source alternative to GitBook and Swimm. Other open-source alternatives to GitBook include GitBook, Outline and Wiki.js.
Is mdBook actively maintained?
Yes. The most recent commit to mdBook was on 12 November 2026, and the latest release is v0.5.4, published on 6 July 2026. The project has 22k stars on GitHub, with 77 added in the last 30 days.

Open-source alternatives to mdBook

See all

SaaS alternatives to mdBook

See all