KahWee - Web Development, AI Tools & Tech Trends

What I actually run: Claude Code workflows, static blogs on Cloudflare, React/Vite tooling, and AI cost notes. By KahWee.

Learning Rust with Claude Code Through Local Hardware Projects

Claude Code lowered the cost of being a Rust beginner enough that I built local tools for a Kasa power strip and a thermal printer.

Personal projects rarely die because nobody can write the first line. They die at the next unknown: an unfamiliar language, an undocumented protocol, or hardware that answers differently than the vendor app. Claude Code keeps me moving through that gap.

The rest of my Claude Code notes follow the same edges: installing the native CLI, using plugins for frontend work, and deciding what a shared budget can cover.

This blog was the first project where I learned that lesson. Claude Code helped build it before I turned the same workflow toward the devices in my house.

The result is Denki, a Rust command-line tool for controlling Kasa and Tapo lights and plugs over my local network. It discovers devices, checks what each device can actually do, and keeps the vendor cloud out of the command path.

Home Assistant still handles the higher-level light groups in my office. My Kasa power strip sat outside that workflow. Claude Code helped me work through the protocol, isolate the device behavior, and build the command around it. The proof was physical: the outlet turned on and off from my terminal.

Every useful command gave the next Rust concept a reason to exist.

The unknown no longer ends the project

Claude Code still needs steering. I point it at the problem, question its design choices, run the commands, and test the result. That attention pays for itself here because each correction teaches me Rust while the code has a job to do.

The same attention becomes expensive when a model is slow or weak. I wrote about that tradeoff in GLM Is Cheap. Steering It Isn’t.. Learning projects give the steering a return that routine work does not.

Denki has enough moving pieces to make that useful: local discovery, old Kasa devices with one protocol, newer Tapo devices with another, capability checks, device aliases, and hardware smoke tests that stay outside the regular test suite. I would have lost momentum trying to learn every layer before writing the first useful command.

I work outward from a real failure. A device does not respond. I inspect the request, trace the parser, change the capability guard, and run the test again. Claude Code fills in the Rust knowledge I am missing, while the hardware decides whether its answer was right.

That loop has taught me more than generated code. It makes the language feel less like a gatekeeping exercise and more like the material between me and a working tool.

A printer is the same kind of problem

Thermark came from the same irritation. Pocket thermal printers ship with vendor apps, cloud accounts, and awkward template screens. I wanted a local command that prints a guest Wi-Fi QR code or a label for something in the house.

Claude Code helped with Bluetooth, image layout, and QR rendering. Those are three domains I would not have combined in a Rust project on my own. The project now prints labels over Bluetooth LE or USB without asking a vendor service for permission.

The agent did not remove the work. I still had to decide what a useful label looks like, test output on the actual printer, and correct assumptions that only break on physical hardware. It removed the dead time between “I want this” and “I have enough code to try.”

Cursor owns the work editor

Cursor’s tab completion is better for my day job. I already know the codebase, the language, and the next small change I want to make. Fast inline completion keeps me moving without leaving the editor.

Personal projects start further away from the answer. I need help reading a protocol, tracing a repository, sketching a command shape, and explaining the code being added. Claude Code works better for that long conversation.

I use Cursor for the next line and Claude Code for the project that gives the line a reason to exist. Judgment still sits with me.

The project teaches the language

Claude Code gives me a sequence of small, testable questions instead of one huge prerequisite called “learn Rust.” That is the promise I care about.

Denki exists because a power strip would not cooperate with the software I already had. Thermark exists because printing a QR label should not require a cloud account. I learned Rust because those problems were concrete enough to keep me honest.

The agent kept the projects moving. The devices made me learn.