Add exercise async1

The goal here was to get the first bit of "muscle memory" for using the
async and await keywords. The little story should make it more intuitive
for users why asynchronous programming is needed in the first place.

This exercise will be moved to the location corresponding to the book in
a later commit, to keep the diff of this one clean.
This commit is contained in:
Remo Senekowitsch
2026-08-29 22:39:33 +03:00
committed by Mo Bitar
parent e39e00e056
commit fbb98ad4ea
5 changed files with 140 additions and 0 deletions
+5
View File
@@ -188,6 +188,8 @@ bin = [
{ name = "conversions4_sol", path = "../solutions/23_conversions/conversions4.rs" },
{ name = "conversions5", path = "../exercises/23_conversions/conversions5.rs" },
{ name = "conversions5_sol", path = "../solutions/23_conversions/conversions5.rs" },
{ name = "async1", path = "../exercises/24_async/async1.rs" },
{ name = "async1_sol", path = "../solutions/24_async/async1.rs" },
]
[package]
@@ -196,6 +198,9 @@ edition = "2024"
# Don't publish the exercises on crates.io!
publish = false
[dependencies]
tokio = { version = "1.52.1", features = ["rt"] }
[profile.release]
panic = "abort"