rustoftheday Profile Banner
Daily Rust Profile
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
Don't wanna be here? Send us removal request.
@rustoftheday
Daily Rust
3 days
#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
@rustoftheday
Daily Rust
3 days
๐Ÿฆ€ #Rust Tip #119: Some folks suggest using std::panic::catch_unwind as a solution to the recent unwrap() panic that stopped the internet. In my opinion this is an anti-pattern, some thoughts: - bypasses memory safety constraints (e.g., panic in unsafe block)
9
0
48
@saarw
William Saar
4 days
You generally want a Clippy linter like this one in your Rust production code
@AstraKernel
AstraKernel ๐Ÿ’ซ
5 days
๐Ÿฆ€ 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
@rustoftheday
Daily Rust
5 days
Don't use unwrap() in your production code, boys and girls! ๐Ÿ˜ƒ
@timClicks
Tim McNamara
5 days
Cloudflare generated many millions of HTTP 5XX responses today. They were triggered because code in a core proxy called .unwrap() on a Result for an operation that was expected to never fail.
30
23
409
@orhundev
Orhun Parmaksฤฑz ๐Ÿ‘พ
11 days
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
@orhundev
Orhun Parmaksฤฑz ๐Ÿ‘พ
12 days
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
@rustoftheday
Daily Rust
11 days
๐Ÿฆ€ #Rust Tip #118: Result::and_then lets us chain operations that return Result, bypassing nested pattern matching. Although the ? operator often accomplishes the same, and_then allows us to remain in a more functional "combinator style".
12
13
174
@abshekha
Abhimanyu Shekhawat
19 days
๐Ÿฅต
7
17
177
@rustoftheday
Daily Rust
21 days
๐Ÿฆ€ #Rust Tip #117: fn foo(&self) fn bar (&mut self) fn baz (self) fn boo (mut self) Confused about which one to use in your struct implementations? Here's a useful overview:
8
14
161
@bytetwt
byte.sol โ€” e/acc
1 month
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
@rustoftheday
Daily Rust
1 month
๐Ÿฆ€ #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
@rustoftheday
Daily Rust
2 months
Note: the reason to_uppercase() returns an iterator is that some characters capitalize to two chars. E.g., "๏ฌƒ" (Unicode) to "FFI"
1
0
4
@rustoftheday
Daily Rust
2 months
๐Ÿฆ€ #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
@rustoftheday
Daily Rust
2 months
"Cargo is the most admired cloud development and infrastructure tool" in 2025, says a Stack Overflow study. https://t.co/o6WBpkaEoO
2
4
20
@rustoftheday
Daily Rust
2 months
๐Ÿฆ€ #Rust Tip #114: A serde tip: #[serde(flatten)] can be used to beautify Json output when serializing. This is useful to improve the handling of enums in particular:
0
0
16
@rustoftheday
Daily Rust
3 months
An amazing overview of the core Rust types and traits: https://t.co/Ak9SANexqK
Tweet card summary image
rustcurious.com
A complete map of the Rust type system
1
21
160
@rustoftheday
Daily Rust
3 months
๐Ÿฆ€ #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
@rustoftheday
Daily Rust
3 months
๐Ÿฆ€ #Rust Tip #112: Rust will happily compile and call C functions in unsafe mode. Just declare them in an extern "C" block. Great for interop with legacy code or standard library C functions.
4
13
143
@rustoftheday
Daily Rust
4 months
๐Ÿฆ€ #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
@rustoftheday
Daily Rust
4 months
๐Ÿฆ€ #Rust Tip #110: Rust 2024 edition allows if let Some() chaining. Finally!
4
11
175