domain-embedded

Guide Rust application development for embedded and no_std environments.

51|6|Updated Mar 28, 2019
One-click install
npx skills add https://github.com/Mte90/dotfiles --skill domain-embedded-mte90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-embedded
Source: https://github.com/Mte90/dotfiles/tree/main/.config/opencode/skills/domain-embedded
Command: npx skills add https://github.com/Mte90/dotfiles --skill domain-embedded-mte90

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance and patterns for developing Rust applications in embedded and no_std environments, addressing the unique constraints of limited resources and real-time requirements.

Core Features & Use Cases

  • Constraint Management: Understand and apply rules for no_heap, no_std, real-time, and hardware safety.
  • Pattern Implementation: Learn common Rust patterns for embedded development like static state, interrupt safety, and peripheral ownership.
  • Use Case: You are starting a new project to build firmware for a microcontroller using Rust and need to understand how to manage memory, handle interrupts safely, and interact with hardware peripherals.

Quick Start

Explain the critical constraints for developing embedded Rust applications.

Frequently Asked Questions about domain-embedded

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I develop Rust firmware for a microcontroller in a no_std environment?

To develop Rust firmware for a microcontroller in a no_std environment, you must manage critical constraints like avoiding heap allocation, ensuring real-time predictability, and safely handling hardware interrupts. This involves applying specific design patterns for static state and peripheral ownership.

What are the main challenges of using Rust for embedded systems?

The main challenges of using Rust for embedded systems include managing limited resources, operating without the standard library, ensuring real-time predictability, maintaining hardware safety, and safely handling interrupts under strict resource constraints.

How do I handle heap allocation when building real-time Rust firmware?

Handling heap allocation in real-time Rust firmware requires adhering to no_heap constraints to ensure predictability. You must implement design patterns that utilize static state and avoid dynamic allocation to maintain deterministic execution on microcontrollers.

Can I use standard Rust libraries for microcontroller development?

You cannot use standard Rust libraries for microcontroller development in no_std environments. You must understand the critical constraints of standard library usage and leverage specific embedded crates and layer stacks to interact safely with hardware peripherals.

What are common mistakes when implementing interrupt safety in embedded Rust?

Common mistakes when implementing interrupt safety in embedded Rust often involve improper peripheral ownership and mismanaging static state. Avoiding these errors requires understanding specific design patterns and constraints for handling interrupts safely on microcontrollers.