Daily Rust
@rustoftheday
Followers
3K
Following
737
Media
130
Statuses
457
Daily tips & tricks for Rust ๐ฆ programming. Following back all accounts with ๐ฆ or ๐ช in their profile.
Joined November 2023
#119 (contd.) - imposes runtime cost by stack walking - encourages using panic for control flow - many APIs are not unwind-safe - cannot catch "fatal" errors such as out-of-memory
0
0
10
You generally want a Clippy linter like this one in your Rust production code
๐ฆ Bad news everyone - unwrap() is the reason behind cloudflare outage >The FL2 Rust code that makes the check and was the source of the unhandled error is shown below https://t.co/pZAHuuPNrO
28
49
1K
Animate anything with Rust ๐ฆ ๐ KramaFrame โ A simple, generic, and flexible keyframe animation library. โก Manage multiple animations, apply easing functions, and map progress to any range. ๐ Includes a terminal demo w/ @ratatui_rs โญ GitHub: https://t.co/TodBmsPbbh
0
10
91
This is gold if you're using async Rust ๐ฏ ๐ channels-console โ A TUI dashboard for inspecting std/tokio/futures/crossbeam channels. ๐ Watch messages, queue depth, throughput & memory usage live. ๐ฆ Written in Rust & built with @ratatui_rs โญ GitHub: https://t.co/jfNoMGAkgf
8
46
433
Rust's async is beautiful chaos ๐ฎโ๐จ Most languages hide concurrency complexity. Rust makes you face it and that's why it's faster. Looks simple - async fn fetch_data() { let result = api_call().await; } But under the hood? Rust compiles this into a state machine.
18
14
184
๐ฆ #Rust Tip #116: Most of us should know Mutex<> for locking access to specific resources. However, this does also require locking the resources for read. If you need concurrent access to read, take a look at RwLock<> https://t.co/luPgDHcRSk
1
0
7
Note: the reason to_uppercase() returns an iterator is that some characters capitalize to two chars. E.g., "๏ฌ" (Unicode) to "FFI"
1
0
4
๐ฆ #Rust Tip #115: Here's an interesting self-referential use of iterators, from Rustlings ( https://t.co/qP5zEIFTd0, highly recommended for Rust learners). We get an iterator that capitalizes the char, then use the chain() operator to attach the rest of the string chars.
4
6
101
"Cargo is the most admired cloud development and infrastructure tool" in 2025, says a Stack Overflow study. https://t.co/o6WBpkaEoO
2
4
20
An amazing overview of the core Rust types and traits: https://t.co/Ak9SANexqK
rustcurious.com
A complete map of the Rust type system
1
21
160
๐ฆ #Rust Tip #113: https://t.co/BunGWrJlNN is secretly a decent C build system. You can compile wrappers + link C SDKs for Rust wrappers and calling into C code. BTW those println!s are "hidden" build instructions to Cargo. Who needs Makefiles? ๐ฆ
0
9
112
๐ฆ #Rust Tip #111: You can use the examples/ directory in your crate and cargo run --example <name> to run quick experimentations, demos or tests without affecting your https://t.co/OlqnBdRobN file.
0
2
35
4
11
175