
Domain Iot
This maps IoT domain constraints directly to Rust implementation choices. You get rules like "networks fail constantly" translated into concrete patterns: local buffering with persistence, exponential backoff, MQTT QoS levels. It covers the full spectrum from Linux gateways running tokio and rumqttc to no_std MCU code with embassy. The trace-down structure is the real value here, connecting "need power efficiency" to specific crate choices and sleep patterns. Includes working MQTT client code and a comparison table showing when to use std versus no_std stacks. Best used alongside the embedded and concurrency skills when you're building anything that talks to sensors or actuators over unreliable networks.
- skills.sh installs
- 568
- GitHub stars
- 1.3K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add zhanghandong/rust-skills --skill domain-iot --agent claude-codeInstalls into .claude/skills of the current project.
Files
IoT Domain
Layer 3: Domain Constraints
Domain Constraints → Design Implications
| Domain Rule | Design Constraint | Rust Implication |
|---|---|---|
| Unreliable network | Offline-first | Local buffering |
| Power constraints | Efficient code | Sleep modes, minimal alloc |
| Resource limits | Small footprint | no_std where needed |
| Security | Encrypted comms | TLS, signed firmware |
| Reliability | Self-recovery | Watchdog, error handling |
| OTA updates | Safe upgrades | Rollback capability |
Critical Constraints
Network Unreliability
RULE: Network can fail at any time
WHY: Wireless, remote locations
RUST: Local queue, retry with backoff
Power Management
RULE: Minimize power consumption
WHY: Battery life, energy costs
RUST: Sleep modes, efficient algorithms
Device Security
RULE: All communication encrypted
WHY: Physical access possible
RUST: TLS, signed messages
Trace Down ↓
From constraints to design (Layer 2):
"Need offline-first design"
↓ m12-lifecycle: Local buffer with persistence
↓ m13-domain-error: Retry with backoff
Sponsors
Details
- Repository
- github.com/zhanghandong/rust-skills
- Category
- Rust
- First seen
- Jun 3, 2026
More from zhanghandong/rust-skills
All 34- M15 Anti Pattern5.6K
- Coding Guidelines1.2K
- M10 Performance895
- M07 Concurrency844
- M06 Error Handling827
- Rust Refactor Helper821
- M01 Ownership809
- M04 Zero Cost789
- M05 Type Driven786
- M02 Resource783
- M03 Mutability773
- M12 Lifecycle764
- M14 Mental Model751
- M09 Domain750
- M11 Ecosystem747
- M13 Domain Error738
- Rust Trait Explorer731
- Rust Code Navigator728
- Unsafe Checker726
- Domain Cli709
- Rust Symbol Analyzer702
- Rust Call Graph699
- Rust Router698
- Rust Learner688