Answers from the documentation; checking which model is on duty
Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
domain-embedded - Skill - OpenSmartRoute
Skillv1.0.0
domain-embedded
Use when developing embedded/no_std Rust. Keywords: embedded, no_std, microcontroller, MCU, ARM, RISC-V, bare metal, firmware, HAL, PAC, RTIC, embassy, interrupt, DMA, peripheral, GPIO, SPI, I2C…
Imported from actionbook/rust-skills (skills/domain-embedded/SKILL.md) via skills.sh. Install upstream with npx skills add actionbook/rust-skills --skill domain-embedded. Copyright stays with the author.
Project Context (Auto-Injected)
Target configuration:
!cat .cargo/config.toml 2>/dev/null || echo "No .cargo/config.toml found"
Embedded Domain
Layer 3: Domain Constraints
Domain Constraints → Design Implications
Domain Rule
Design Constraint
Rust Implication
No heap
Stack allocation
heapless, no Box/Vec
No std
Core only
#![no_std]
Real-time
Predictable timing
No dynamic alloc
Resource limited
Minimal memory
Static buffers
Hardware safety
Safe peripheral access
HAL + ownership
Interrupt safe
No blocking in ISR
Atomic, critical sections
Critical Constraints
No Dynamic Allocation
RULE: Cannot use heap (no allocator)
WHY: Deterministic memory, no OOM
RUST: heapless::Vec<T, N>, arrays
Interrupt Safety
RULE: Shared state must be interrupt-safe
WHY: ISR can preempt at any time
RUST: Mutex<RefCell<T>> + critical section
Hardware Ownership
RULE: Peripherals must have clear ownership
WHY: Prevent conflicting access
RUST: HAL takes ownership, singletons
#![no_std]#![no_main]use cortex_m::interrupt::{self, Mutex};use core::cell::RefCell;static LED: Mutex<RefCell<Option<Led>>> = Mutex::new(RefCell::new(None));#[entry]fn main() -> ! { let dp = pac::Peripherals::take().unwrap(); let led = Led::new(dp.GPIOA); interrupt::free(|cs| { LED.borrow(cs).replace(Some(led)); }); loop { interrupt::free(|cs| { if let Some(led) = LED.borrow(cs).borrow_mut().as_mut() { led.toggle(); } }); }}
Common Mistakes
Mistake
Domain Violation
Fix
Using Vec
Heap allocation
heapless::Vec
No critical section
Race with ISR
Mutex + interrupt::free
Blocking in ISR
Missed interrupts
Defer to main loop
Unsafe peripheral
Hardware conflict
HAL ownership
Trace to Layer 1
Constraint
Layer 2 Pattern
Layer 1 Implementation
No heap
Static collections
heapless::Vec<T, N>
ISR safety
Critical sections
Mutex<RefCell>
Hardware ownership
Singleton
take().unwrap()
no_std
Core-only
#![no_std], #![no_main]
Related Skills
When
See
Static memory
m02-resource
Interior mutability
m03-mutability
Interrupt patterns
m07-concurrency
Unsafe for hardware
unsafe-checker
Installed into a catalogue, chosen by a router
Install domain-embedded and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
When a provider is down or over quota the request moves on; the trace says it did.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slotcurl-s-X POST https://osr-api.kindrock-caaab1a2.centralindia.azurecontainerapps.io/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.