You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rocket 0.5 is nearing completion, but several docs are lagging behind the actual code. This meta-issue tracks progress in getting documentation fully up-to-date.
Async I/O Guidance
Async is a big change that goes beyond function names and signatures. Accordingly, it will need additional documentation especially in the guide and the CHANGELOG and migration guide. The following topics and more should be considered:
Blocking operations in route handlers / cooperative multitasking
Rough guidelines of "acceptable" blocking, e.g. low-contention, short-held mutexes, and "unacceptable" blocking, e.g. filesystem and network I/O.
Examples of asynchronous alternatives or wrappers for synchronous libraries
† Workarounds for blocking APIs along with suggested usage and examples: spawn_blocking, block_in_place, dedicated worker tasks and channels, etc.
† Ergonomics of lifetimes, borrowing, async move, and non-Send data
Commonly experienced papercuts or limitations in the compiler.
NB: Many of these issues will be solved "magically" (from the user perspective) by upgrading rustc after they have been fixed, so we should consider whether they are important/common enough to also be in Rocket's documentation
TODO: More ideas? Make suggestions!
† Based on questions seen in IRC and my own experiences while working with async, I have marked these details as especially problematic for migrations. These errors are relatively common, and also difficult to diagnose or understand without experience.
Some of this documentation is not specific to Rocket, and can be supplemented by links to other resources such as:
Specific parts of the API documentation for supporting or utility crates such as futures and tokio.
Entry Attributes
#[rocket::main], #[rocket::launch], and #[rocket::async_test] need detailed docs.
Forms Revamp
The way forms work has been entirely revamped. The following items require updated or checked documentation.
FromForm and FromFormField derive codegen specs.
FromForm and FromFormField trait method docs.
Routing Changes
The effect of changing <path..> is signifcant and should be called out especially.
UTF-8 is now supported everywhere. One example mentions this, but we should likely call this out.
Broken Links (help!)
Are all doc links valid and pointing somewhere? We need to run a link-checker on both the guide and rustdocs as well as handle all warnings issues by rustdoc.
Rocket 0.5 is nearing completion, but several docs are lagging behind the actual code. This meta-issue tracks progress in getting documentation fully up-to-date.
Async I/O Guidance
Async is a big change that goes beyond function names and signatures. Accordingly, it will need additional documentation especially in the guide and the
CHANGELOGand migration guide. The following topics and more should be considered:spawn_blocking,block_in_place, dedicated worker tasks and channels, etc.async move, and non-Senddataawaitpoints (often problematic for borrows and forSend) - e.g. Tracking issue for more precise coroutine captures rust-lang/rust#69663rustcafter they have been fixed, so we should consider whether they are important/common enough to also be in Rocket's documentation† Based on questions seen in IRC and my own experiences while working with
async, I have marked these details as especially problematic for migrations. These errors are relatively common, and also difficult to diagnose or understand without experience.Some of this documentation is not specific to Rocket, and can be supplemented by links to other resources such as:
futuresandtokio.Entry Attributes
#[rocket::main],#[rocket::launch], and#[rocket::async_test]need detailed docs.Forms Revamp
The way forms work has been entirely revamped. The following items require updated or checked documentation.
FromFormandFromFormFieldderive codegen specs.FromFormandFromFormFieldtrait method docs.Routing Changes
The effect of changing
<path..>is signifcant and should be called out especially.UTF-8 is now supported everywhere. One example mentions this, but we should likely call this out.
Broken Links (help!)
Are all doc links valid and pointing somewhere? We need to run a link-checker on both the guide and rustdocs as well as handle all warnings issues by rustdoc.
CC #1242 (comment)
CC #1065