This is the result of running `cargo update` in every directory.
It fixes a alert: https://github.com/advisories/GHSA-9mcr-873m-xcxp. We
don’t run any HTTP server directly, so this is not super important for
us. However, it will remove the alert from my dashboard.
In v2 of the course, I'd like to include an estimate of the time to be
spent on each segment in the Markdown file. I think a good place for
such metadata is in the frontmatter.
For review purposes, though, I just want to display that information.
So, this is a start at a new mdbook preprocessor that just separates out
the frontmatter and includes it in a `<pre>` block. Eventually, I'd like
to parse it and put the time in the speaker notes.
---------
Co-authored-by: Martin Geisler <martin@geisler.net>
Hello there 👋 I'm the author of the `tokio-websockets` crate and
today we published version `0.4.0` of the crate, which finally makes the
public API consistent and aligns it with expectations.
`WebsocketStream` now implements the `Stream` trait, so calling `next()`
has to be done via `StreamExt` now. `connect()` returns a tuple of
`(WebsocketStream, Response)`, so that has to be deconstructed now. And
finally, `as_text()` now returns an `Option<&str>` instead of
`Result<&str, Error>`.
And, *very* importantly: The old `WebsocketStream::next` was **not**
cancellation safe, the new `Stream` implementation is. The exercise uses
`select!`, which very well might have caused misbehavior.
Since we also emptied the default features, I've added the very minimal
ones required to compile the exercise.
This is my first contribution here, so feel free to point me to some
things if I'm missing anything. I wasn't really sure what to do about
the translations, I guess I should leave them as is and they'll be
updated by translators in other PRs?
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
* Adds a description of the async chat exercise
* Simplifies the use of Error in chat-async
* Links the solution to the async chat exercise
* Removes the elevator exercise
The i18n-helpers are now available as a stand-alone crate:
https://crates.io/crates/mdbook-i18n-helpers.
Because we cache the Rust binaries in our GitHub workflows, I bumped
the cache prefix to ensure we use a clean cache. Otherwise, Cargo
won’t install the new binaries in mdbook-i18n-helpers because it sees
the old ones from this repository.
The API changed a little from version 0.1.0.
The new release includes https://github.com/BrettDong/polib/pull/1,
which means we can simplify the code that writes a new PO file.
* Parse Markdown to support translation.
This upgrades from just splitting Markdown files on double-newlines, to
using a Markdown parser to break them into more appropriate chunks. The
upshot is that code samples are all in one message, lists are bundled
together, and generally it should be easier to translate.
* [WIP] helper to update po files for new translation
* process synthetic input file-by-file
* review comments
* remove temporary code
* fix msgfmt lints
* Make i18n-helpers a requirement
* Skip mdbook-gettext for mdbook-xgettext
* Gettext finds PO file based on `book.language`
* Update workflow
No need to set `preprocessor.gettext.po-file`.
---------
Co-authored-by: Jooyung Han <jooyung@google.com>
* Move Cargo.toml for exercises to exercises directory.
* Create a workspace with both exercises and i18n-helpers.
* Build in CI as well as testing.
* Binaries must have a main function.
* No need for workspaces configuration for caching anymore.