-
Rust Syn Crate Tutorial: Automate Builder Patterns with Custom Macros:
Learn how to use the Rust Syn crate to create custom builder patterns with procedural macros. This tutorial covers step-by-step implementation, examples, and tips for building flexible APIs in Rust with Syn.
-
Securely sending DHT22 sensor data from an ESP32 board to PostgreSQL | Caio's Stuff:
Let's collect data provided by a DHT22 sensor and store it asynchronously in a PostgreSQL database via WiFi using an encrypted connection. We will start with a brief introduction about the principal technologies, proceed to setting-up the necessary environment and then code our project.
-
Sqlx4k - Introduction to the Kotlin native and FFI (Part 1) | :: exploration and stuff :::
Introduction Recently, I began experimenting with the Kotlin Native platform. I initiated a new repository and attempted to create a simple project utilizing the ktor libraries. The purpose of the project was to recreate a small service that integrates some basic libraries and compile it to a native target (macosArm64 in my case). The service aimed to offer support for: Dependency injection HTTP server Database access (PostgreSQL) Additionally, RabbitMQ support (though it isn’t a priority for now) In this first article of the series, I aim to describe how I ended up writing “low-level” code (FFI between Kotlin and Rust) and also to highlight the importance of native compatibility in Kotlin Native.
-
Sqlx4k - Introduction to the Kotlin native and FFI (Part 2)
-
orxfun - notes:
This article discusses iterable and collection traits that represent types that can be iterated over repeatedly, and how they are introduced almost effortlessly thanks to the powerful type system of rust.
-
Rope Optimizations, Part 1 — Zed's Blog:
From the Zed Blog: In this episode of Zed Decoded, Thorsten and Antonio walk through the performance optimizations Antonio when working on Zed's Rope data structure before they then pair on adding more optimizations
-
Video version
-
How to organize large Rust codebases:
Want to learn more real-world Rust, offensive security and applied cryptography? Take a look at my book Black Hat Rust, where, among other things, you will learn how to build your own end-to-end encryption protocol for a Remote Access Tool (RAT), web servers and exploits in Rust. As a Rust
-
Understanding Memory Ordering in Rust | Evan Schwartz:
I am reading Mara Bos' Rust Atomics and Locks. On the first pass, I didn't really grok memory ordering. So here's my attempt at understanding by explaining.
-
Rust and embedded programming with Leon Vak:
In this online session Leon Vak, who gave 3 excellent presentations about Embedded programming and Linux kernel programming with Rust at Abra, is going to show us how he uses Rust to write programs for an embedded device.
-
Building a DNS Server in Rust: Part 1 of 2:
Learn how to build a DNS server in Rust from scratch. Explore the DNS protocol, create a simple server, and handle DNS queries with ease.
-
Crafting Interpreters with Rust: On Garbage Collection | ltungv:
I became interested in implementing programming languages a few years ago and discovered [Crafting Interpreters](https://craftinginterpreters.com/) by Bob Nystrom. At the time, I had experience with Rust and decided to use it to follow the book. Albeit, being a noob, I managed to implement a fully functional bytecode interpreter that supported every feature of the Lox language as described. However, my implementation suffered memory leaks due to reference counting. Back then, I didn't fully grasp Rust to design and implement a proper garbage collector (GC)! Now that I have more confidence in the language, I decided to revisit the project and improve its memory management scheme.
-
Rust Async I/O: Futures, Thread Pools:
Learn how Rust's async system enhances performance by utilizing futures, wakers, and thread pools for non-blocking I/O operations
-
Fastest Vec Update on My Computer | Anti Object Oriented Programming:
“Premature optimization is the root of all evil.” At least that is what ‘big java’ wants you to think. But if I wasn’t worried about optimizations I’d be using linked lists in Haskell. I use rust because I want speed. If you are here for speed, then keep reading. In this post you’ll find a detailed account of how I created a problem, solved the problem, and then optimized the solution way to much.
-
Concurrent and parallel future execution in Rust:
A lot has been written about concurrency and parallelism, so we only briefly define what is needed for this article: Concurrent programming allows us to run two or more computations in overlapping per
-
Comprehending Proc Macros - YouTube:
Rust procedural macros can do amazing things, including implementing an entire dang Python feature from scratch. I've wanted to make this "lecture+tutorial" ...
-
Global Registration:
You might not have considered this before, but tests in Rust are rather magical. Anywhere in your project you can slap `#[test]` on a function and the compiler makes sure that they're all automatically run. This pattern, of wanting access to items that are distributed over a crate and possibly even multiple crates, is something that projects like bevy, tracing, and dioxus have all expressed interest in but it's not something that Rust supports except for tests specifically.
-
Decrusting the quickcheck crate - YouTube:
In this stream, we peeled back the crust on the quickcheck crate —https://github.com/BurntSushi/quickcheck/ — and explored its interface,structure, and mecha...
-
A 10x faster batch job by batching PostgreSQL inserts/updates with Rust and SQLx:
I have this hourly batch job that was taking ~30 minutes to complete and was causing too much strain on the database because it needs to insert/update between 300,000 and 500,000 records every time. The batch job makes thousands and thousands of network requests, so a 30 minute execution time
-
Async Rust for Dummies:
Introduction Hello, Rustaceans! I'm quite sure many of you use async Rust every day in your projects, but do you actually know how it works under the hood? In…
-
orxfun - notes:
This article discusses the requirement for vector traits and motivation behind the orx-v crate that provides discussed abstraction to unify the vectors.
-
Prototyping in Rust | corrode Rust Consulting:
Programming is an iterative process - as much as we would like to come up with the perfect solution from the start, it rarely works that way.
-
Packaging a Rust Program for Fedora | Jose Fernandez:
Packaging a Rust program for Fedora may seem daunting initially, but it’s more straightforward than expected, thanks to excellent documentation, Rust-specific tooling, and a helpful community. Over the past two months, I packaged bpftop, a process monitor for eBPF programs. While there were some specific considerations with Rust, the process was manageable. In this post, I’ll share the steps I took, the insights I gained, and how to streamline the experience.
-
A length-indexed Vector in Rust:
Sneak peeking at Dependent Types and an encoding of length-indexed vectors in Rust to constraint consumers on operations they can perform. It’s customary to introduce Dependent Types (types as first-class citizens that may depend on terms) with vectors (or rather linked-lists) parameterized by a type A, indexed by a type...
-
Building Thread-safe Async Primitives in 150 lines of Rust | Amit's Blog:
In this post, I’ll go over a simple, yet fast implementation of the (commonly seen) “oneshot” channel, going through lower-level asynchronous Rust, synchronization primitives, all alongside the unseen footguns of concurrent code
-
Sqlx4k - Interoperability between Kotlin and Rust, using FFI (Part 1) | :: exploration and stuff :::
Introduction Previously, in the Sqlx4k - Introduction to Kotlin Native and FFI (Part 2), the second part of this series, we attempted to provide an introduction to how C Interoperability functions in Kotlin, offering various examples from the GitHub - smyrgeorge/sqlx4k codebase. Sqlx4k is a small, non-blocking PostgreSQL database driver written in Kotlin for the Native platform. It wraps the sqlx driver from the Rust ecosystem under the hood. The communication between the two languages is facilitated using FFI.
-
100 Exercises To Learn Rust:
This course will teach you Rust's core concepts, one exercise at a time. You'll learn about Rust's syntax, its type system, its standard library, and its ecosystem.
-
Porting the guff plot device to Rust - YouTube:
For this stream, I wanted to implement something in Rust where we didn't _also_ need to learn a new technical topic, and instead could focus just on the "wri...
-
Emjay - a simple JIT that does math · Andrea Bergia's Website:
Today I wanna show off my most recent little project, called emjay. It’s a very simple “language”, with an evaluator that generates JIT code and executes it. It does not have a “normal” interpreter, only the JIT compiler. The language is extremely limited, but that was intentional, since I wanted something simple that I could write end-to-end. All the code is written in Rust and it is hosted on GitHub at https://github.com/andreabergia/emjay. It’s roughly 4k lines of code including tests, so it is small enough to be presented in this post.
-
Justin Beaurivage's Blog:
Version 0.20.0 of the atsamd-hal project was recently released. With it comes its first official support for async peripheral APIs. To mark the occasion, I wanted to share my experience writing futures from scratch on microcontrollers, and help demistify this sometimes complex, yet incredibly useful tool.
-
Writing eBPF Tracepoint Program with Rust Aya: Tips and Example – Yuki Nakamura's Blog:
TL;DR This post shows an example eBPF Tracepoint program and shares tips on writing the eBPF Tracepoint programs with aya. 🦀🐝 IntroductionDataflow Kernel spaceUser spaceBenefits of using ayaOne language: RustAuto-generating Rust codesRun eBPF Tracepoint tracing programPrerequisitesCloneGenerate structs codesBuild and RunTips on writing eBPF codesTip1: Deserializing with generated struct codesTip2. Decode __data_locTip3. PerCpuArray eBPF Map as…
-
Vendoring C/C++ dependencies in Rust:
What is vendoring about? I'm writing this post because basically I haven't found any guide about this, and for sure with this level of completeness and…
-
Build with Naz : Box and Pin exploration in Rust | developerlife.com:
This tutorial, video, and repo are a deep dive into Rust Pin and Box types, along with concepts of ownership and borrowing. We will also cover a lot of background information on the concepts of operating system process, memory allocation and access, stack, and heap. The examples we create are designed to demonstrate the different semantics around the use of boxes and pinned boxes in Rust.
-
Video version
-
Reading a Remote File Using Rust - crustc:
1. Introduction Remote servers are essential in modern computing and are used by many institutions from small businesses to enterprises. SSH (Secure Shell) is a protocol that allows secure remote access to systems. By using SSH, we can interact with files on a remote server without downloading them locally. In this tutorial, we'll explore how
-
Building a Bevy Plugin for Rolling Dice // Erik Horton:
I’ve been thinking through a game idea that I know will need a dice rolling mechanic, so I decided to build out an MVP of that. The following is the end result of 2 days of working through that.
-
Difference Between iter() and into_iter() in Rust - crustc:
1. Introduction The Rust language provides iterators that make complex data structures easy to traverse, transform, and filter. Common iterators in Rust include iter(), iter_mut(), and into_iter(). Iter() and into_iter() are provided for different use cases. In this tutorial, we'll learn the basics of iter() and into_iter(). Finally, we'll see an example use case and
-
Writing a Simple Driver in Rust – Pavel Yosifovich:
The Rust language ecosystem is growing each day, its popularity increasing, and with good reason. It's the only mainstream language that provides memory and concurrency safety at compile time, with a powerful and rich build system (cargo), and a growing number of packages (crates). My daily driver is still C++, as most of my work…
-
Implementing a Lox interpreter in Rust - YouTube:
For some time I've been looking for an opportunity to do a stream on writing a parser + interpreter for... something. Anything really. I've wanted to impleme...