HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
pretzelhammer
rust-blog
Rust2020–2025
pretzelhammer / rust-blog

rust-blog

Educational blog posts for Rust beginners

14Distinct people
18Mentions
0Explicit recommenders
8.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Educational blog posts for Rust beginners

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year18 dated mentions

Observed mentions: 2020-05-12 22:42:02 UTC to 2025-12-15 05:46:35 UTC.

02462020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 7 mentions; 6 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC761
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC422
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC110
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC431
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC110

What Hacker News says

18 sources
I believe the difference is that the JS version specifies compression strategy 3 (Z_RLE)[0][1], whereas the Rust crate is using the default compression strategy[2]. Both otherwise use the same underlying compression library (deflate aka zlib) and the same compression level (9). [0]: https://github.com/pretzelhammer/using-rust-in-non-rust-serv... [1]: https://zlib.net/manual.html#Advanced:~:text=The%20strategy%... [2]: https://github.com/rust-lang/flate2-rs/blob/1a28821dc116dac1... Edit: Nevermind. If you look at the actual generated files, they're 594 and 577 bytes respectively. This is mostly HTTP headers. [3]: https://github.com/pretzelhammer/rust-blog/blob/master/asset... [4]: https://github.com/pretzelhammer/rust-blog/blob/master/asset...
In Using Rust in non-Rust servers to improve performance
Sorry, I probably edited my comment while you were replying and added a couple links. Check misconception 2 here, I think it addresses your point. https://github.com/pretzelhammer/rust-blog/blob/master/posts... EDIT to your edit: > 'static in this context would mean that all instances of T must be 'static. You mean in T: 'static? No. It means that any instance passed as type T must be bound by 'static and therefore could be held up to the end of 'static. This does not mean that they're allocated at compile time, it just so happens that static variables (allocated at compile time) are 'static but the causality is reversed. > If you want something to mean "A type cannot have references in it" then invent a 'noref lifetime. It can have references in it! As long as they're bound by 'static. Here's an example: https://play.rust-lang.org/?versi
Read the rest
In A half-hour to learn Rust
Types are not generated at runtime, lifetimes are types (although they cannot be constructed). T<'a> and T<'b> are different types altogether (although, being generic, they can resolve to the same type if 'a == 'b, but it's not required). All this happens at compile time. When you say T: 'a you say that T is a subtype of 'a hence it lives longer. https://doc.rust-lang.org/nomicon/subtyping.html Maybe you're being confused by misconception 1 here? https://github.com/pretzelhammer/rust-blog/blob/master/posts... Type T, being generic, can be an OwnedStruct, but also an &'a BorrowedStruct or a StructWithReferences<'a>. The owned one is a subtype of 'static since it's owned, but the ones with lifetimes are subtypes of 'a which itself (being a generic lifetime) can be a subtype of 'static or any other lifetime. Again, all this happens and is ch
Read the rest
ecked at compile time. This ensures that at runtime, the actual references are alive as per their lifetimes without explicitly checking them anymore.
In A half-hour to learn Rust
I wrote 4 tiny brainfuck compilers in Rust targeting x86, ARM, WebAssembly, and LLVM. The code is 100% safe Rust and is dependency-free. Excluding shared code (just the brainfuck parser) each compiler is standalone and is between just 100-180 lines of Rust. To share my learning experiences I wrote an accompanying article called Learn Assembly by Writing Entirely Too Many Brainfuck Compilers in Rust which goes into detail of how I arrived at all my implementations: https://github.com/pretzelhammer/rust-blog/blob/master/posts... Please let me know if you have any questions or feedback. Thank you!
In Show HN: Tiny Brainfuck Compilers Written in Rust

Showing the 15 most recent of 18 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.