Rust Articles, Tutorials & News

Complex Procedural Rust Macros

In this post, we write a procedural macro that generates code to bind functions and types including arbitrary many impl blocks to a scripting language. The problems encountered and techniques learned can be applied to other tasks where complex compile-tim…

Read more »

A fast port scanner in 100 lines of Rust

To write a fast port scanner, a programming language requires: A Good I/O model, not to eat all the resources of the system. High-level abstractions and a good packaging system to isolate low-level code and reuse it easily. To be type and memory safe, be…

Read more »

Understanding #[derive(Clone)] in Rust

This post assumes that you have an entry-level familiarity with Rust: you’ve fought with the borrow checker enough to start to internalize some of its model; you’ve defined structs, implemented traits on those structs, and derived implementations of commo…

Read more »