comprehensive-rust
comprehensive-rust copied to clipboard
Show `stderr` from code blocks
Today, mdbook doesn't show stderr when running Rust code. The problem is that it uses a Playground endpoint which doesn't deliver this information. However, the Playground itself does have this information via an internal endpoint. See https://github.com/rust-lang/mdBook/pull/1315 for details.
Fixing this would allow us to start using dbg!(foo) instead of println!("foo: {foo:?}") in our code samples and thus simplify a lot of code blocks.
With https://github.com/google/mdbook-i18n-helpers/pull/75 merged, many more code blocks would be automatically removed from the translation files, thus reducing churn for our translators.
I'll try to work on it in the next two weeks. -- Emma
Thanks Emma! You might very likely have to make changes to the upstream mdbook — we should upstream as much as possible, both so it can benefit everybody and so we can avoid carrying patches (which makes it hard to update our version of mdbook).