diff --git a/.gitignore b/.gitignore index 9d970c4482..c51ac55911 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ Cargo.lock /target/ -/doc/book/ +/book/ **/*.rs.bk .cargo diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0770cfd656..83bb01a853 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,19 +55,19 @@ Some terms we currently use regularly in the codebase: Proposing architectural changes --- -Solana's architecture is described by markdown files in the `doc/` directory, currently maintained -by @garious. To change the architecture, you'll need to at least propose a change with an RFC document, -and create an issue to track its implementation. Here's the full process: +Solana's architecture is described by a book generated from markdown files in the `src/` directory, +currently maintained by @garious. To change the architecture, you'll need to at least propose a change +with an RFC document, and create an issue to track its implementation. Here's the full process: 1. Propose to a change to the architecture by creating a PR that adds a markdown document called an RFC - (standing for "request for comments") to the directory `rfcs/`. Add at least the maintainer of `doc/` - as a reviewer. + (standing for "request for comments") to the directory `rfcs/`. Add at least the maintainer of the + markdown book as a reviewer. 2. The PR being merged indicates your proposed change was accepted and that the Solana maintainers support your plan of attack. Next, create an issue to track its implementation and create a PR that updates the RFC with a link to the issue. This link allows anyone to quickly check the implementation status of any RFC. 3. Submit PRs that implement the RFC. Be sure to reference the issue created above in your PR description. Feel free to update the RFC as the implementation reveals the need for tweaks to the architecture, - but if you do, be sure to add the maintainer of `doc/` as a reviewer to your PR. + but if you do, be sure to add the maintainer of the markdown book as a reviewer to your PR. 4. Once the implementation is complete, close the issue. Depending on the scope of the RFC, the maintainer - of `doc/` may then create a separate ticket to integrate the RFC into `doc/`. + of markdown book may then create a separate ticket to integrate the RFC into the book. diff --git a/README.md b/README.md index ac2fe25263..86638b7401 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,34 @@ $ git clone https://github.com/solana-labs/solana.git $ cd solana ``` +Building the Solana book +--- + +Install mdbook: + +```bash +cargo install mdbook +``` + +Run any Rust tests in the markdown: + +```bash +mdbook test +``` + +Render markdown as HTML: + +```bash +mdbook build +``` + +Render and view the book: + +```bash +mdbook build --open +``` + + Testing --- @@ -443,3 +471,4 @@ better way to solve the same problem, a Pull Request with your solution would mo welcome! Likewise, if rewriting a test can better communicate what code it's protecting, please send us that patch! + diff --git a/doc/art/consensus.msc b/art/consensus.msc similarity index 100% rename from doc/art/consensus.msc rename to art/consensus.msc diff --git a/doc/art/fullnode.bob b/art/fullnode.bob similarity index 100% rename from doc/art/fullnode.bob rename to art/fullnode.bob diff --git a/doc/art/lamport.bob b/art/lamport.bob similarity index 100% rename from doc/art/lamport.bob rename to art/lamport.bob diff --git a/doc/art/sdk-tools.bob b/art/sdk-tools.bob similarity index 100% rename from doc/art/sdk-tools.bob rename to art/sdk-tools.bob diff --git a/doc/art/tpu.bob b/art/tpu.bob similarity index 100% rename from doc/art/tpu.bob rename to art/tpu.bob diff --git a/doc/art/tvu.bob b/art/tvu.bob similarity index 100% rename from doc/art/tvu.bob rename to art/tvu.bob diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 615836b5d5..82a4ec03bf 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -48,10 +48,8 @@ done # Build the HTML export PATH=$CARGO_HOME/bin:$PATH maybe_install mdbook -_ cd doc _ mdbook test _ mdbook build -_ cd - echo --- ci/localnet-sanity.sh ( diff --git a/doc/README.md b/doc/README.md deleted file mode 100644 index fec26fb0c2..0000000000 --- a/doc/README.md +++ /dev/null @@ -1,25 +0,0 @@ -## Building the Solana book - -Install mdbook: - -```bash -cargo install mdbook -``` - -Run any Rust tests in the markdown: - -```bash -mdbook test -``` - -Render markdown as HTML: - -```bash -mdbook build -``` - -Render and view the book: - -```bash -mdbook build --open -``` diff --git a/doc/src/SUMMARY.md b/src/SUMMARY.md similarity index 100% rename from doc/src/SUMMARY.md rename to src/SUMMARY.md diff --git a/doc/src/appendix.md b/src/appendix.md similarity index 100% rename from doc/src/appendix.md rename to src/appendix.md diff --git a/doc/src/avalanche.md b/src/avalanche.md similarity index 100% rename from doc/src/avalanche.md rename to src/avalanche.md diff --git a/doc/src/fullnode.md b/src/fullnode.md similarity index 100% rename from doc/src/fullnode.md rename to src/fullnode.md diff --git a/doc/src/img/fullnode.svg b/src/img/fullnode.svg similarity index 100% rename from doc/src/img/fullnode.svg rename to src/img/fullnode.svg diff --git a/doc/src/img/lamport.svg b/src/img/lamport.svg similarity index 100% rename from doc/src/img/lamport.svg rename to src/img/lamport.svg diff --git a/doc/src/img/sdk-tools.svg b/src/img/sdk-tools.svg similarity index 100% rename from doc/src/img/sdk-tools.svg rename to src/img/sdk-tools.svg diff --git a/doc/src/img/tpu.svg b/src/img/tpu.svg similarity index 100% rename from doc/src/img/tpu.svg rename to src/img/tpu.svg diff --git a/doc/src/img/tvu.svg b/src/img/tvu.svg similarity index 100% rename from doc/src/img/tvu.svg rename to src/img/tvu.svg diff --git a/doc/src/introduction.md b/src/introduction.md similarity index 100% rename from doc/src/introduction.md rename to src/introduction.md diff --git a/doc/src/jsonrpc-api.md b/src/jsonrpc-api.md similarity index 100% rename from doc/src/jsonrpc-api.md rename to src/jsonrpc-api.md diff --git a/doc/src/jsonrpc-service.md b/src/jsonrpc-service.md similarity index 100% rename from doc/src/jsonrpc-service.md rename to src/jsonrpc-service.md diff --git a/doc/src/ledger.md b/src/ledger.md similarity index 100% rename from doc/src/ledger.md rename to src/ledger.md diff --git a/doc/src/ncp.md b/src/ncp.md similarity index 100% rename from doc/src/ncp.md rename to src/ncp.md diff --git a/doc/src/poh.md b/src/poh.md similarity index 100% rename from doc/src/poh.md rename to src/poh.md diff --git a/doc/src/porep.md b/src/porep.md similarity index 100% rename from doc/src/porep.md rename to src/porep.md diff --git a/doc/src/programs.md b/src/programs.md similarity index 100% rename from doc/src/programs.md rename to src/programs.md diff --git a/doc/src/runtime.md b/src/runtime.md similarity index 100% rename from doc/src/runtime.md rename to src/runtime.md diff --git a/doc/src/synchronization.md b/src/synchronization.md similarity index 100% rename from doc/src/synchronization.md rename to src/synchronization.md diff --git a/doc/src/terminology.md b/src/terminology.md similarity index 100% rename from doc/src/terminology.md rename to src/terminology.md diff --git a/doc/src/tpu.md b/src/tpu.md similarity index 100% rename from doc/src/tpu.md rename to src/tpu.md diff --git a/doc/src/tvu.md b/src/tvu.md similarity index 100% rename from doc/src/tvu.md rename to src/tvu.md diff --git a/doc/src/vdf.md b/src/vdf.md similarity index 100% rename from doc/src/vdf.md rename to src/vdf.md