Skip to content

doc: provide epub download of The Book #20866

Closed as not planned
Closed as not planned

Description

@akavel

Could you possibly add an .epub version of The Book for download on the website?

The epub format seems at least mentioned in some Makefiles, so I hope this should be not very hard -- unless it's defunct and unsupported, and would have to be done from scratch? If not, then still there are some tools like pandoc, that I think support making epubs from Markdown already, so at least should be doable without reinventing the tools...

I'd be very grateful, thanks.

Activity

  1. killercup commented on Jan 10, 2015

    @killercup
    Contributor

    I've thought about this, as well. @steveklabnik, too.

    Technically, this might a bit tricky, partially because of #20826.

    What you need to do is create one markdown document with a correct outline (i.e. cleverly interpreting and changing headline levels) and in order of the table of contents (i.e. parsing the TOC file which is a markdown list containing links). But then it would be trivial to feed that to pandoc and generate all sorts of formats!

  2. akavel commented on Jan 10, 2015

    @akavel
    ContributorAuthor

    As to #20826, I've just sent a pull request that might (or might not) close the issue.

  3. killercup commented on Jan 10, 2015

    @killercup
    Contributor

    @akavel I don't think that'll solve this problem by itself, since all the chapter headings are actually level two in the global table of contents.

    E.g., "2.8. Compound Data Types" should be a level 2 heading in an ebook, therefore the content of that chapter should start headings at level 3. (In an epub/book, heading level 1 might be a "part", level 2 might be a "chapter" and level 3+ might be subsections.)

    Your changes might simplify the script needed to compile the book contents though.

  4. killercup commented on Jan 11, 2015

    @killercup
    Contributor
  5. akavel commented on Jan 11, 2015

    @akavel
    ContributorAuthor

    Woohoo, awesome, thanks a lot! And the code samples seem to wordwrap quite nicely on my nook too, big thanks! :)

  6. Gankra commented on Jan 21, 2015

    @Gankra
    Contributor

    @killercup would it be possible to integrate this back into our toolchain for us to officially provide it?

  7. killercup commented on Jan 21, 2015

    @killercup
    Contributor

    @gankro please do! Consider the code to be in the public domain; just take it, it's yours.

    I don't think it'd take much time to rewrite this in Rust, it's just a bunch of calls to pandoc. It would be a nice feature for rustbook.

  8. removed
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on May 6, 2015
  9. killercup commented on May 17, 2015

    @killercup
    Contributor

    Just an update: Last week I redid most of that script I posted above. This now also deals with normalizing code blocks and fixing links. You can find it here and the results (html, epub, pdf) here.

  10. steveklabnik commented on Jan 4, 2016

    @steveklabnik
    Contributor

    Further update: I am still interested in getting this done, but takes some infrastructure work. @brson and @edunham and I should chat about it, maybe.

  11. 50 remaining items

  12. zhoukuncheng commented on Jun 25, 2022

    @zhoukuncheng

    This browser extension can convert HTML to EPUB easily.
    https://github.com/dteviot/WebToEpub

  13. anzbert commented on Aug 7, 2022

    @anzbert

    thx @CeresCa .
    I've used that extension to create create an epub for the latest book version
    The_Rust_Programming_Language_1.59.epub.zip

  14. miguno commented on Jan 10, 2023

    @miguno
  15. lapwat commented on Jan 23, 2023

    @lapwat

    You can easily create the ebook yourself with papeer. It keeps content, text formatting, images and code blocks.

    Install it with: go install github.com/lapwat/papeer@latest

    Use the CSS selector ol>li>a to select all table of content items. Specify epub format.

    papeer get --selector='ol>li>a' --format=epub https://doc.rust-lang.org/book/
    # [===========>] The Rust Programming Language - The Rust Programming Language (104 / 104)
    # Ebook saved to "The_Rust_Programming_Language_-_The_Rust_Programming_Language.epub"

    The_Rust_Programming_Language_-_The_Rust_Programming_Language.epub.zip

  16. ivanglushko commented on May 25, 2023

    @ivanglushko

    Here's a pdf print from the site - And I manually added table of contents there.

    The Rust Programming Language.pdf

  17. vitali2y commented on May 25, 2023

    @vitali2y

    Here's a pdf print from the site - And I manually added table of contents there.

    Cool. How about .epub as on title on the top?

  18. impredicative commented on May 29, 2023

    @impredicative

    Here's a pdf print from the site - And I manually added table of contents there.

    The Rust Programming Language.pdf

    How does one go about finding such a link for a future version?

  19. shirshak55 commented on Jun 1, 2023

    @shirshak55
    Contributor

    @impredicative if you are seeking pdf then you can find it here. Updated daily. https://github.com/shirshak55/Rust-Book-In-PDF/releases

  20. hustcer commented on Jun 1, 2023

    @hustcer

    @shirshak55 Wow, super cool, It would be better if there were a epub version

  21. ivanglushko commented on Jun 1, 2023

    @ivanglushko

    How does one go about finding such a link for a future version?

    I don't plan on keeping this up to date sorry. Maybe it's possible to write a script that will link all the chapters in pdf but I didn't find a fast solution. So had to do it manually.

  22. dralley commented on Sep 4, 2023

    @dralley
    Contributor

    This is a duplicate of rust-lang/book#3669 - in any case, book related issues should be filed over there.

  23. Dylan-DPC commented on Nov 18, 2023

    @Dylan-DPC
    Member

    Closing this as the book issue already covers this

  24. dieterplex commented on Feb 7, 2024

    @dieterplex

    Like shirshak55's daily PDF https://github.com/shirshak55/Rust-Book-In-PDF/releases,
    here's my daily ePub https://dieterplex.github.io/rust-ebookshelf/ in case someone is still interested.

  25. added a commit that references this issue on Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-help-wantedCall for participation: Help is requested to fix this issue.P-lowLow priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions