In this post, I will build a minimal ping-pong server and client in Rust using tokio-tungstenite, and use the client to measure real round-trip times across 100 exchanges (collecting min, avg, and max latency) using a Cloudflare Tunnel between them. I want to use this test for a future blog post where I will try to encapsulate other protocols in it.

Continue reading

While building a TCP server (TcpListener) in Rust, I needed to process connections one at a time. I kept noticing that new connections were being accepted but never actually processed, they just hung in standby until the client gave up and disconnected. In this post, I will walk through a minimal TCP server that uses a Semaphore to force max concurrent connections.

Continue reading

In the future, I want to start building battery powered projects, so understanding power consumption becomes critical. In this post, I will explore deep sleep power consumption on the ESP32-C6 board using Rust with Embassy and Esp-hal. Beyond simply putting the board to sleep, I’ll also examine the key factors that affect deep sleep current on this board, such as providing the correct voltage to the battery pin.

Continue reading

Recently, I set out to explore how to read and write the memory of a running process in Rust. Programming isn’t just about writing code that runs—it’s also about understanding what happens under the hood. Sometimes it is necessary to understand how memory works, for debugging, or even implement a simple IPC mechanism without going through sockets or shared memory. This experiment turned into a neat experiment that combines Linux internals (process_vm_readv/process_vm_writev), unsafe Rust, and a reminder of why process isolation is such an important security boundary.

Continue reading

ESP32 Net Sentinel Dongle

To sharpen my Rust skills for embedded systems, I embarked on creating a project that uses Discord (and soon MQTT) to receive commands for network tasks. Users can monitor devices, perform network scans, execute pings, send WOL packets and get alerts when applications running on edge devices fail.

Continue reading

Today I will share my journey of preparing a working environment to develop Rust for Espressif boards. Discover how I made the decision to work with Rust for embedded systems, a language known for its safety, speed, and reliability. I’ll also guide you through the process of preparing your development environment, like installing necessary tools, and configuring your workspace to program Rust in VS Code using Docker Dev Containers.

Continue reading

Author's picture

David Melo

engineer and a techie

Telco Engineer

Portugal