rusthints's profile picture. Sharing knowledge about Rust code quality, design patterns, concurrency, security and optimization. This is an unofficial community managed project.  #TLDRust

RustHints

@rusthints

Sharing knowledge about Rust code quality, design patterns, concurrency, security and optimization. This is an unofficial community managed project. #TLDRust

置頂

RustHints is always looking for relevant #rustlang content around code quality, design patterns, concurrency, security and optimization. Feel free to @rusthints if you have something to share that might be of interest!


RustHints 已轉發

The "Rust syntax is not that bad" people have not yet discovered that the expression `x = y + ..` parses as `x = (y + ..)` while the expression `x = .. + y` parses as `(x = ..) + y`. In other languages, the precedence of an operator depends on that operator. So it makes sense to…


RustHints 已轉發

Want to do cross-language profiling? The profiler that our team at optimyze and later Elastic has worked on for the past few years has been open-sourced today! We also released a first preview of the local dev UI for it along with that (it's free)! elastic.co/blog/elastic-u…

athre0z's tweet image. Want to do cross-language profiling? 

The profiler that our team at optimyze and later Elastic has worked on for the past few years has been open-sourced today! We also released a first preview of the local dev UI for it along with that (it's free)!

elastic.co/blog/elastic-u…

Delve into performance engineering with @gamozolabs streams with #rustlang. Experience content equivalent to advanced professional trainings, all within a dynamic, unscripted setting. A perfect opportunity to unravel and learn advanced topics in a pragmatic context.

Do you use any debugger or tool that has ever existed? Ever disappointed with the symbol resolution speed? Come watch me make symbol resolution fast. Like... really fast. Like... want to resolve symbols every instruction with minimal overhead fast. twitch.tv/gamozo



The 'anyhow' library by @davidtolnay in #rustlang streamlines error handling with a unified Error type. It offers a quick error creation 'anyhow!' macro and context chaining, providing more insight into error origins and aiding debugging. github.com/dtolnay/anyhow


This book by @m_ou_se brilliantly explains memory ordering, interior mutability, and the art of safe and efficient spin locks.

📕 What's the most exciting thing you learned from Rust Atomics and Locks? marabos.nl/atomics/



Rust 1.68's std::pin::pin!() macro refines pinning, offering safety and expressiveness. Usable as an expression, it adds flexibility and is well-suited for immovable async objects and complex structures. #rustlang


RustHints 已轉發

📕 What's the most exciting thing you learned from Rust Atomics and Locks? marabos.nl/atomics/


RustHints 已轉發

🆕🆕🆕🦀 In the last few weeks, #rustlang 1.68.0, 1.68.1 and 1.68.2 have been released! Here's a thread with some of the highlights of Rust 1.68. 🧵 1/11 blog.rust-lang.org/2023/03/09/Rus…


RustHints 已轉發

It is now easier to safely "Pin" something on the stack, using the new `std::pin::pin!()` macro. 📌 Unlike pin macros provided by some popular crates, std's new pin macro can be used as an expression: 3/11

m_ou_se's tweet image. It is now easier to safely "Pin" something on the stack, using the new `std::pin::pin!()` macro. 📌 Unlike pin macros provided by some popular crates, std's new pin macro can be used as an expression:

3/11

RustHints 已轉發

oh hell yeah the Rust training course that the Android folks have been working on got open sourced it's very good! google.github.io/comprehensive-…


RustHints 已轉發

In Rust, when creating a string always consider doing it with some pre-allocated capacity (::with_capacity(n)). If you don't the string starts with 0 capacity and will require a memory allocation when you add some content to it.


Why Rust mutexes look like they do - cliffle.com/blog/rust-mute…


RustHints 已轉發

I wrote a really simple RISC-V (rv32i) JIT for x86_64 designed for gathering some stats for my upcoming Bluehat IL talk. It runs at about ~1 RISC-V instruction per 2 x86 cycles, and can create and run hello world ~8.6 million times per second on 96 cores! github.com/gamozolabs/rv3…


RustHints 已轉發

The std::fs::remove_dir_all function in the Rust standard library is vulnerable to a race condition (CVE-2022-21658). We will release Rust 1.58.1 with the fix later today. Read the advisory: blog.rust-lang.org/2022/01/20/cve…


RustHints 已轉發

Here's the DAC authorization library I wrote. It allows you to specify specific grants for principals interacting with resources and enforce (at compile-time) that all of the appropriate authorization checks have occurred. crates.io/crates/dacquiri github.com/resyncgg/dacqu…


RustHints 已轉發

We’re back! New year, new talk: Herman Venter will talk about MIRAI his abstract interpreter for Rust. Join us Monday January 31st to 𝘧𝘰𝘳𝘮𝘢𝘭𝘭𝘺 start the year. eventbrite.com/e/rfmig-return…

eventbrite.fr

RFMIG Returns: MIRAI with Herman Venter

Welcome back to the RFMIG! We're kicking off the year with a talk from Herman Venter on MIRAI.


RustHints 已轉發

✨ Need to quickly plot something in @rustlang? Just import the excellent Matplotlib from Python! 🦀 💛 🐍 📊

m_ou_se's tweet image. ✨ Need to quickly plot something in @rustlang? Just import the excellent Matplotlib from Python!

🦀 💛 🐍 📊

RustHints 已轉發

Today, we're releasing Dylint, a new linting tool for Rust code that uses dynamic libraries to help you maintain custom rules and manage multiple compiler versions easier. trailofbits.com/post/write-rus…


RustHints 已轉發

Another exciting new feature in @rustlang 1.53: Nested or patterns. 🦀✨ This allows you to use the `|` or operator anywhere inside a pattern, instead of only at the top level: Before: Some(A) | Some(B) After: Some(A | B)

m_ou_se's tweet image. Another exciting new feature in @rustlang 1.53: Nested or patterns. 🦀✨

This allows you to use the `|` or operator anywhere inside a pattern, instead of only at the top level:

Before: Some(A) | Some(B)

After: Some(A | B)

Loading...

Something went wrong.


Something went wrong.