Repository navigation
Write a real crate page for docs.rs - #67
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
The docs.rs front page is now a tour. An architecture diagram sits under the intro, then Quick start with an examples table, then "A Tour of FastNN" with Models, Training, Data, Checkpoints, GPU, Generation and Debugging, then Tensors, Autograd, Feature flags, Platform support and Modules. Every snippet is a doctest. The
tensor,autograd,nn,optim,data,serializeandcudamodule pages get a front page with an example and a list of what lives there.The diagram is
assets/architecture.svg, referenced fromlib.rsby its raw GitHub URL onmaster. It carries its own colours with aprefers-color-schemerule, so it reads on both docs.rs themes.Why
The docs.rs page was a tagline, one snippet and a list of module names, while the README explained far more. The front page is what people land on from crates.io, so it should explain how to use the library on its own.
How it was verified
cargo testpassescargo clippy --all-targets -- -D warningsis cleancuda_parityon a GPU--releaseDocs only. 41 doctests pass (up from 25) and
cargo docwith-D warningsis clean, so every link resolves. Claims in the prose were checked against the code:unsafeonly insrc/cuda/,sm_75tosm_90frombuild.rs, the[1]-item batching rule, theload_trainingrefusal. The SVG was checked under both colour schemes.The image URL points at
master, so it shows a broken image in a localcargo docuntil this merges.Checklist
tensor/opsandautograd/opsstill mirror each other///docsAbout 300 public items (fields, variants, op methods) still have no doc comment. That is a separate pass.