From 3d4b55bdd0e6bc9a4d5dab1e8322053e1048a355 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Wed, 15 Mar 2017 12:55:28 -0400 Subject: [PATCH 1/3] Add README.md --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..1973ee1 --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +# The Rustonomicon + +The Dark Arts of Advanced and Unsafe Rust Programming + +Nicknamed "the Nomicon." + +## NOTE: This is a draft document, and may contain serious errors + +> Instead of the programs I had hoped for, there came only a shuddering blackness +and ineffable loneliness; and I saw at last a fearful truth which no one had +ever dared to breathe before — the unwhisperable secret of secrets — The fact +that this language of stone and stridor is not a sentient perpetuation of Rust +as London is of Old London and Paris of Old Paris, but that it is in fact +quite unsafe, its sprawling body imperfectly embalmed and infested with queer +animate things which have nothing to do with it as it was in compilation. + +This book digs into all the awful details that are necessary to understand in +order to write correct Unsafe Rust programs. Due to the nature of this problem, +it may lead to unleashing untold horrors that shatter your psyche into a billion +infinitesimal fragments of despair. + +### Requirements + +Building the Nomicon requires [mdBook]. To get it: + +[mdBook]: https://github.com/azerupi/mdBook + +```bash +$ cargo install mdbook +``` + +### Building + +To build the Nomicon: + +```bash +$ mdbook build +``` + +The output will be in the `book` subdirectory. To check it out, open it in +your web browser. + +_Firefox:_ +```bash +$ firefox book/index.html # Linux +$ open -a "Firefox" book/index.html # OS X +$ Start-Process "firefox.exe" .\book\index.html # Windows (PowerShell) +$ start firefox.exe .\book\index.html # Windows (Cmd) +``` + +_Chrome:_ +```bash +$ google-chrome book/index.html # Linux +$ open -a "Google Chrome" book/index.html # OS X +$ Start-Process "chrome.exe" .\book\index.html # Windows (PowerShell) +$ start chrome.exe .\book\index.html # Windows (Cmd) +``` + +To run the tests: + +```bash +$ mdbook test +``` + +## Contributing + +Given that the Nomicon is still in a draft state, we'd love your help! Please feel free to open +issues about anything, and send in PRs for things you'd like to fix or change. If your change is +large, please open an issue first, so we can make sure that it's something we'd accept before you +go through the work of getting a PR together. \ No newline at end of file From 34d3f162a4415ef4375c25f93882350cc91800b2 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Wed, 15 Mar 2017 13:02:35 -0400 Subject: [PATCH 2/3] add travis.yml --- .travis.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..46b823b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +language: rust + +cache: cargo + +rust: + - nightly + - beta + - stable + +before_script: + - (cargo install mdbook --git https://github.com/azerupi/mdBook.git --force || true) + +script: /home/travis/.cargo/bin/mdbook test; From 1e2b93f5c9bfaa264c0ad547301bf04d706320a1 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Wed, 15 Mar 2017 14:53:52 -0400 Subject: [PATCH 3/3] only do travis on nightly it's the nomicon, duh :ghost: --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46b823b..11dacb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,6 @@ cache: cargo rust: - nightly - - beta - - stable before_script: - (cargo install mdbook --git https://github.com/azerupi/mdBook.git --force || true)