Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Builtin Package Registry

All packages ship with the toolchain. There is no external package manager.

core/*

No-alloc. Works on bare-metal. Always safe to use on MCU targets.

See core/* for full API details.

PackagePurpose
core/cloneStandard Clone trait for explicit duplication
core/fmtNo-heap, writer-first formatting
core/ioReader and Writer traits
core/syncAtomics, OnceCell<T>, Lazy<T>, critical sections
core/cmpOrdering enum and compare() for custom sort APIs
core/embedCompile-time asset embedding

std/*

Higher-level. May require heap. Cross-target where the concept applies.

See std/* for full API details.

PackagePurpose
std/timeDuration, Instant, sleep_ms, sleep_us
std/fmtOwned-string formatting
std/syncChannels, Mutex<T>, Semaphore
std/textPortable text views, text.Split, and text.Buffer[N]
std/ioBuffered IO, file handles (host targets)
std/fsFilesystem APIs (host targets / SD card)

micro/*

MCU peripheral APIs. See HAL and Micro Library for full API details.

PackagePurpose
micro/gpioGPIO peripheral API
micro/uartUART peripheral API
micro/adcADC peripheral API
micro/pwmPWM peripheral API
micro/i2cI2C bus API
micro/spiSPI bus API
micro/pioPIO state machine API
micro/dmaDMA controller API

board/*

Board-specific pin maps, defaults, and convenience constructors. Available packages depend on the selected board. See Targets and Boards.

PackagePurpose
board/picoRaspberry Pi Pico (RP2040)
board/pico2Raspberry Pi Pico 2 (RP2350)