Skip to content
TILens What matters today in tech v0.4.0
Theme
Topics - Rust
Calendar · NOV 2026
‹ Nov 2026 ›
  1. JAN
  2. FEB
  3. MAR
  1. APR
  2. MAY
  3. JUN
  1. JUL
  2. AUG
  3. SEP
  1. OCT
  2. NOV
  3. DEC
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Favorites (0)

Community stream

Community

Two-way vs. one-way unification when resolving traits

I'm trying to understand how trait resolving in the code below works: enum Wrap<T> { W, WithVal(T), } struct Alt; trait Two<B> {} impl<T> Two<T> for Wrap<T> {} fn f<P, Q>(p: P, q: Q) where P: Two<Q> {} fn main() { f(Wrap::W, Alt); } This code…

rust-internals

Discussions about the future of atomic primitives in rust

Hello, Rustaceans! As we all know, the atomic primitives and standards mostly comes from the C++ 11 atomic primitives standards and definitions. But in C++ 26, even C++ deprecated APIs like atomic_load/store and moves to smarter type abstractions…

rust-internals

`cfg(extern = "rand")`

I don't have the time to drive this atm; I'm mostly posting as a place to reference the idea and in case anyone else wants to pick it up. Some cfg expressions can get complex or repetitive of specific data. cfg_select! and eventually cfg aliases can…

rust-internals

Why does the Drop trait take a mutable reference?

The drop trait is currently defined as: fn drop(&mut self) { // ... } But the thing is, after dropping the value, the value is no longer accessible. This is also the reason why you can't call the Drop trait explicitly as then you could cause a use…

rust-internals

Const-first functions

Today, as far as I'm aware, Rust has two variants of const functions: const-capable functions that are only used as const when called from const context (regular const fn) "comptime" const functions that can only be called during compile time: Add…

rust-internals

There should be a primitive int / float trait in core / stdlib

This would be useful in cases were you want to use / store a number but don't care about a specific type of number for example: /// add two integers together pub fn add<T: PrimitiveInt>(x: T, y: T) -> T { x + y } This could also be useful for…

rust-internals

Typed keys as dyn-dispatchable method receivers

A lot of Rust game engines rely on deferring actions or on interior mutability, and one of the main reasons is: trait GameComponent { fn tick(&mut self, world: &mut World) {} } This can't compile in a useful way. the component lives inside the…

rust-internals

Unsafe fields cannot define a correct moment to check conditions

For unsafe methods, the safety requirements can be divided into exact two categories: requirements before invoking (Vec::set_len requires new elements are initialized before this function), and requirements after invoking (Pin::new_unchecked…

rust-internals

Insecure fn

Hi, i request that feature because example let's have fn generate_img_src(url: String) -> String { format!(r#"<img src="{}" />"#, url) } that function is insecure because vulnerable to XSS, i propose something like #[insecure] fn…

rust-internals

Encephalitis

I was recently diagnosed with anti-NMDA receptor encephalitis. It is an autoimmune disorder where your body’s normally helpful antibodies start acting strangely. This leads to inflammation in the brain. This blog briefly discusses some of my…

burntsushi

Regex engine internals as a library

Over the last several years, I’ve rewritten Rust’s regex crate to enable better internal composition, and to make it easier to add optimizations while maintaining correctness. In the course of this rewrite I created a new crate, regex-automata,…

burntsushi

A byte string library for Rust

bstr is a byte string library for Rust and its 1.0 version has just been released! It provides string oriented operations on arbitrary sequences of bytes, but is most useful when those bytes are UTF-8. In other words, it provides a string type that…

burntsushi

Using unwrap() in Rust is Okay

One day before Rust 1.0 was released, I published a blog post covering the fundamentals of error handling. A particularly important but small section buried in the middle of the article is named “unwrapping isn’t evil”. That section briefly…

burntsushi

Archlinux on the System76 Darter Pro

This is a quick post reviewing my Archlinux setup on a System76 Darter Pro (model: darp6) with Coreboot, along with some thoughts about the laptop in general. This is my first laptop upgrade since I purchased a ThinkPad T430 in July 2012 Target…

burntsushi

My FOSS Story

I’d like to break from my normal tradition of focusing almost strictly on technical content and share a bit of my own personal relationship with Free and Open Source Software (FOSS). While everyone is different, my hope is that sharing my…

burntsushi

Rust and CSV parsing

With csv 1.0 just released, the time is ripe for a tutorial on how to read and write CSV data in Rust. This tutorial is targeted toward beginning Rust programmers, and is therefore full of examples and spends some time on basic concepts. Experienced…

burntsushi

ripgrep is faster than {grep, ag, git grep, ucg, pt, sift}

In this article I will introduce a new command line search tool, ripgrep, that combines the usability of The Silver Searcher (an ack clone) with the raw performance of GNU grep. ripgrep is fast, cross platform (with binaries available for Linux, Mac…

burntsushi

Index 1,600,000,000 Keys with Automata and Rust

It turns out that finite state machines are useful for things other than expressing computation. Finite state machines can also be used to compactly represent ordered sets or maps of strings that can be searched very quickly. In this article, I will…

burntsushi

Error Handling in Rust

Like most programming languages, Rust encourages the programmer to handle errors in a particular way. Generally speaking, error handling is divided into two broad categories: exceptions and return values. Rust opts for return values. In this…

burntsushi

Syntax extensions and regular expressions for Rust

WARNING: 2018-04-12: The code snippets for this post are no longer available. This is just as well anyway, since they all depended on an unstable internal compiler interface, which hasn’t existed for years. A few weeks ago, I set out to add regular…

burntsushi

444 items available