Eric Huss 30d3aeb691 Remove non_exhaustive from Book
This removes the `non_exhaustive` attribute from the `Book` and its
inner types `BookItem` and `Chapter`. These were added in
https://github.com/rust-lang/mdBook/pull/2779. After thinking about it
more, I realized that these types cannot be extended in a
semver-compatible way, so I am fine with allowing them be exhaustive.

The problem is that with CmdPreprocessor, the `Book` will be
re-serialized by a preprocessor, which could potentially be on an older
version. Attempting to add any new fields/variants means that either the
deserialization will fail, or the new fields will be stripped by the
preprocessor.

These could potentially be structured such that they have a
`serde(flatten)` or Other/Unknown variant so that a preprocessor would
at least see the extra fields/variants and pass them along back to the
output. However, a preprocessor or renderer wouldn't know what to do
with those new fields/variants (particularly `BookItem`) which would
itself be a problem. It's still possible to do something like this in
the future, but for now I think it's fine to restrict these to
semver-major changes.
2025-08-29 18:24:44 -07:00
2025-07-23 17:29:12 -07:00
2024-05-16 17:27:28 -07:00
2025-08-29 18:24:44 -07:00
2025-08-27 14:44:12 -07:00
2025-08-27 14:44:12 -07:00
2025-04-05 20:41:36 -04:00
2025-08-26 15:44:01 -07:00
2025-08-26 15:44:01 -07:00
2025-07-14 15:45:55 -07:00
2025-08-25 15:15:47 -07:00
2015-07-29 01:11:30 +02:00
2025-08-27 14:44:12 -07:00
2025-07-23 17:29:55 -07:00
2025-03-23 13:04:10 -07:00

mdBook

CI Status crates.io LICENSE

mdBook is a utility to create modern online books from Markdown files.

Check out the User Guide for a list of features and installation and usage information. The User Guide also serves as a demonstration to showcase what a book looks like.

If you are interested in contributing to the development of mdBook, check out the Contribution Guide.

License

All the code in this repository is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file.

Description
Create book from markdown files. Like Gitbook but implemented in Rust
Readme MPL-2.0 20 MiB
Languages
Rust 75.7%
JavaScript 7.6%
CSS 6.5%
Handlebars 5.5%
HTML 4%
Other 0.7%