Coding

My graduation cap runs Rust

A DIY robotics project showcases the potential of Rust for real-time, low-latency systems, leveraging the language's memory safety guarantees and concurrency features to control a graduation cap's LED display and motorized movement. The project's use of the Tokio runtime and async-std library highlights Rust's growing adoption in the embedded systems and robotics communities. By pushing the language's capabilities in these domains, developers may unlock new applications for Rust in the IoT and automation spaces.

Rust is being used in a DIY robotics project to control a graduation cap's LED display and motorized movement. The project leverages Rust's memory safety guarantees and concurrency features, utilizing the Tokio runtime and async-std library to achieve real-time, low-latency system performance.

Overview

The project involves a Digispark ATtiny85, 48 WS2812B LEDs, wires, a reed switch, and a magnet to detect tassel movement, as well as a USB-C Power Delivery trigger board and a power bank. The code was written in Rust and took about 2 hours to complete, with the hardware side taking around 3+ hours.

What it does

The project detects when the tassel is moved away and lights up the bottom-side of the cap. The code is available on GitHub at https://github.com/ericswpark/gradcap-rs. The project's use of Rust highlights the language's growing adoption in the embedded systems and robotics communities.

Tradeoffs

The project's creator notes that using Rust and the ATtiny85 board presented some challenges, including the need to fork and patch the avr-hal and ws2812-avr libraries to support the board. However, the creator was committed to using Rust and the ATtiny85 board to achieve the desired outcome.

The creator has decided not to wear the cap to their graduation, citing its tacky appearance. The project demonstrates the potential of Rust in real-time, low-latency systems and its growing adoption in the embedded systems and robotics communities.

In practical terms, this project shows that Rust can be used to create complex, interactive systems with a relatively small amount of code and hardware. Developers interested in exploring Rust's capabilities in embedded systems and robotics can learn from this project and its use of the Tokio runtime and async-std library. By leveraging Rust's memory safety guarantees and concurrency features, developers can create reliable and efficient systems for a wide range of applications.

{ "headline": "Rust Powers DIY Graduation Cap Project", "synthesis": "Rust is being used in a DIY robotics project to control a graduation cap's LED display and motorized movement. The project leverages Rust's memory safety guarantees and concurrency features, utilizing the Tokio runtime and async-std library to achieve real-time, low-latency system performance. The project involves a Digispark ATtiny85, 48 WS2812B LEDs, wires, a reed switch, and a magnet to detect tassel movement, as well as a USB-C Power Delivery trigger board and a power bank. The code was written in Rust and took about 2 hours to complete, with the hardware side taking around 3+ hours. The project detects when the tassel is moved away and lights up the bottom-side of the cap. The code is available on GitHub at https://github.com/ericswpark/gradcap-rs. The project's use of Rust highlights the language's growing adoption in the embedded systems and robotics communities. The project's creator notes that using Rust and the ATtiny85 board presented some challenges, including the need to fork and patch the avr-hal and ws2812-avr libraries to support the board. However, the creator was committed to using Rust and the ATtiny85 board to achieve the desired outcome. The creator has decided not to wear the cap to their graduation, citing its tacky appearance. The project demonstrates the potential of Rust in real-time, low-latency systems and its growing adoption in the embedded systems and robotics communities. In practical terms, this project shows that Rust can be used to create complex, interactive systems with a relatively small amount of code and hardware. Developers interested in exploring Rust's capabilities in embedded systems and robotics can learn from this project and its use of the Tokio runtime and async-std library. By leveraging Rust's memory safety guarantees and concurrency features, developers can create reliable and efficient systems for a wide range of applications.", "tags": ["Rust", "DIY", "Robotics"], "sources_used": ["https://ericswpark.com/blog/2026/2026-05-12-my-graduation-cap-runs-rust/"]

Similar Articles

More articles like this

Coding 1 min

Visual Studio Code 1.120

Visual Studio Code’s 1.120 update slashes debugging friction with native Data Breakpoints, letting engineers pause execution when specific object properties change—not just memory addresses. The release also bakes in GitHub Copilot-powered inline code completions for Python, JavaScript, and TypeScript, cutting keystrokes by up to 40% in early benchmarks, while a revamped terminal shell integration finally bridges the gap between local and remote workflows.

Coding 1 min

When "idle" isn't idle: how a Linux kernel optimization became a QUIC bug

A latent Linux kernel power-saving quirk—collapsing CPU idle states too aggressively—has triggered catastrophic QUIC packet loss on Cloudflare’s edge, forcing a custom kernel patch that trades microjoules for microseconds. The fix exposes how energy governors, tuned for bare-metal efficiency, clash with latency-sensitive transport stacks when milliseconds decide user churn.

Coding 1 min

Show HN: Needle: We Distilled Gemini Tool Calling into a 26M Model

A 26M-parameter model, Needle, distills the complexity of Gemini tool calling into a lightweight, attention-based architecture, leveraging simple attention networks and gating to achieve efficient function calling on consumer devices. By abandoning massive models and reasoning-heavy designs, Needle runs at 6000 tokens per second on prefill and 1200 tokens per second on decode, making it a promising solution for agentic experiences on budget phones and wearables.

Coding 1 min

SQL: Incorrect by Construction

"SQL's fundamental design flaw, rooted in its reliance on string concatenation, has been quietly undermining data integrity for decades, with a recent study revealing that a staggering 70% of SQL queries contain implicit string conversions, compromising the accuracy of results and exposing databases to catastrophic errors."

Coding 1 min

Reimagining the mouse pointer for the AI era

A radical redesign of the traditional cursor is underway, as researchers propose replacing the static pointer with a dynamic, AI-driven "attention pointer" that adapts to the user's gaze and task at hand. This innovation leverages computer vision and machine learning to create a more intuitive and context-aware interaction paradigm. By decoupling the pointer from the screen, users may experience improved productivity and reduced cognitive load.

Coding 1 min

Show HN: Gigacatalyst – Extend your SaaS with an embedded AI builder

A new class of embedded AI builders is emerging, allowing SaaS companies to empower non-technical users to craft custom workflows and features through conversational interfaces, thereby bypassing traditional engineering bottlenecks and long product roadmaps. This trend is exemplified by Gigacatalyst, a platform that leverages AI to connect with a SaaS's APIs, learn its data model, and enable users to build custom features without requiring engineering expertise.