mastouille.fr est l'un des nombreux serveurs Mastodon indépendants que vous pouvez utiliser pour participer au fédiverse.
Mastouille est une instance Mastodon durable, ouverte, et hébergée en France.

Administré par :

Statistiques du serveur :

594
comptes actifs

#asyncrust

0 message0 participant0 message aujourd’hui
Suite du fil

Second: Pinning helpers!

When doing async #Rust, there will be a point, where you'll get the ominous "Doesn't implement Unpin" error and "You need to pin your value".

First, learn about Pinning:
doc.rust-lang.org/std/pin/

Like, _really_ learn and understand it:
fasterthanli.me/articles/pin-a

And then use smol's pin! macro and the `pin_project` crate:
docs.rs/pin-project/latest/pin

I might continue this thread with more insights I gain during this little project - stay tuned! 🙂

4/4?

doc.rust-lang.orgstd::pin - RustTypes that pin data to a location in memory.

Async #Rust is actually awesome! :awesome:

The last few days I've built a prototype(!) of a global "Hotkey" system e.g.:

Press & Hold `LCtrl + Space`
=> an async stream starts and only finishes if:
- another key is pressed or
- one of the Hotkeys is released

If it is not clear by now: this is a state-machine, which fits _perfectly_ into Rust's #async model!

And the best part: This is actually _the first time_ I've ever touched async #RustLang! Such a pleasant experience!

1/?

Just got a new release of Tokio Console (and supporting crates) out, only a month and a half after the last release!

How did we manage this? Release-plz makes releasing super easy, even when I have to patch the version of tokio-console to avoid a (pre-1.0) major version bump (because tonic upgrades mean we need a major version bump for console-api and console-subscriber).

Check it out: release-plz.ieni.dev/

Thank you @MarcoIeni !

release-plz.ieni.devRelease-plz Rust crate | Release-plzRelease Rust crates from CI with a Release PR

We just released a new version of Tokio Console. Tokio Console is a debugger for async Rust (running with the Tokio runtime).

This includes new versions of the following crates:
* tokio-console v0.1.11 (github.com/tokio-rs/console/re)
* console-subscriber v0.3.0 (github.com/tokio-rs/console/re)
* console-api v0.7.0

Upgrade tokio-console and make sure you use the latest console-subscriber to get the latest features!

A thread of some of the changes.

GitHubRelease tokio-console-v0.1.11 · tokio-rs/consoletokio-console-v0.1.11 - (2024-06-10) Added Replace target column with kind column in tasks view (#478) (903d9fa) Add flags and configurations for warnings (#493) (174883f) Add --allow flag (#513) ...

*makes some happy screaming noise* :awesome: :ferris:

#Rust will end this year with a long awaited feature that will define it's future:

We will get "async fn and return-position impl Trait in trait" (#AFIT & #RPITIT).

It will be stabilized in the next #RustLang version 1.75, which will be released on 28 December, 2023.

releases.rs/docs/1.75.0/

PR:
github.com/rust-lang/rust/pull

Thank you Rust #community for all of your hard work! ❤️