Skip to content

Generate fresh copy of "The Rust Programming Language" book #20

Open
@atc0005

Description

@atc0005

Directions

  1. lxc launch ubuntu:18.04 rustbook-builds
  2. lxc exec rustbook-builds -- sudo --login --user ubuntu
  3. sudo apt-get update
  4. sudo apt-get install -y git build-essential
  5. curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
  6. source $HOME/.cargo/env
  7. cargo install mdbook --vers 0.3.7
  8. cargo install mdbook-epub
  9. git clone https://github.com/rust-lang/book rust-book
  10. cd rust-book
  11. Modify book.toml
    • see below
  12. mdbook build
  13. ls -lh book/epub/
  14. exit
  15. lxc file pull rustbook-builds/home/ubuntu/rust-book/book/epub/'The Rust Programming Language.epub' ./

Since I build within an LXD container, the above will generate a new LXD container, build the book and pull the newly generated epub from the container into the host environment.

Modifications to book.toml

ubuntu@rustbook-builds:~/rust-book$ git diff

diff --git a/book.toml b/book.toml
index 6797f2df..f1797bde 100644
--- a/book.toml
+++ b/book.toml
@@ -5,3 +5,6 @@ author = "Steve Klabnik and Carol Nichols, with Contributions from the Rust Comm
 [output.html]
 additional-css = ["ferris.css", "theme/2018-edition.css"]
 additional-js = ["ferris.js"]
+
+[output.epub]
+

References

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions