Cargo Features

[dependencies]
uni-cli = { version = "0.0.12", default-features = false, features = ["target-linux", "target-microbit", "target-pico", "target-pico2", "target-stm32h753zi", "std", "advanced_math", "complex_numbers"] }
default = advanced_math, complex_numbers, std, target-linux

Default: full-featured Linux build

target-linux default

Target selection (mutually exclusive - pick ONE)

Enables std of editline ^0.0.20, repl and std of uni-core

target-microbit = alloc-cortex-m, cortex-m, cortex-m-rt, embedded-hal, microbit, panic-halt

micro:bit has only 128KB SRAM - keep features minimal to avoid memory issues

Enables microbit of editline ^0.0.20, hardware-microbit and repl of uni-core

target-pico = advanced_math, alloc-cortex-m, complex_numbers, cortex-m, cortex-m-rt, panic-halt, rp2040-boot2, rp2040-hal, usb-device, usbd-serial

Pico has 264KB SRAM - sufficient for advanced features (REPL only, no GPIO)

Enables rp_pico_usb of editline ^0.0.20, repl and target-pico of uni-core

Affects uni-cli::BOOT2

target-pico2 = advanced_math, alloc-cortex-m, complex_numbers, cortex-m, cortex-m-rt, panic-halt, rp235x-hal, usb-device, usbd-serial

Pico 2 has 520KB SRAM - plenty of room for all features (REPL + GPIO)

Enables rp_pico2_usb of editline ^0.0.20, hardware-pico2 and repl of uni-core

Affects uni-cli::IMAGE_DEF

target-stm32h753zi = advanced_math, alloc-cortex-m, complex_numbers, cortex-m-rt, defmt, defmt-rtt, embassy-executor, embassy-futures, embassy-stm32, embassy-time, embassy-usb, panic-probe

STM32H753ZI has 1MB RAM - full features with async Embassy runtime (no uni-core/repl - uses async implementation in uni-cli)

Enables critical-section-single-core of cortex-m, stm32h753zi of editline ^0.0.20, target-stm32h753zi of uni-core

std default

Optional features (passed through to uni-core)

Enables std of uni-core

advanced_math default target-pico? target-pico2? target-stm32h753zi?

Enables advanced_math of uni-core

uni-core:

Trig, exp/log, rounding, advanced division

complex_numbers default target-pico? target-pico2? target-stm32h753zi?

Enables complex_numbers of uni-core

uni-core:

Complex and Gaussian integer support

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

rp2040-hal target-pico?

Enables rp2040-hal ^0.10

Pico-specific optional dependencies

rp2040-boot2 target-pico?
rp235x-hal target-pico2?

Enables rp235x-hal

Pico 2-specific optional dependencies

usb-device target-pico? target-pico2?

Enables usb-device

USB dependencies (shared by both Pico and Pico 2)

usbd-serial target-pico? target-pico2?
embassy-stm32 target-stm32h753zi?

Enables embassy-stm32 ^0.4.0

STM32H753ZI-specific optional dependencies

embassy-executor target-stm32h753zi?
embassy-usb target-stm32h753zi?
embassy-time target-stm32h753zi?
embassy-futures target-stm32h753zi?
defmt target-stm32h753zi?

Enables defmt ^0.3

defmt-rtt target-stm32h753zi?

Enables defmt-rtt ^0.4

panic-probe target-stm32h753zi?

Enables panic-probe ^0.3

embedded-hal none target-microbit?
microbit none target-microbit?

Enables microbit-v2 ^0.15

panic-halt none target-microbit? target-pico? target-pico2?

Enables panic-halt ^0.2

alloc-cortex-m none target-microbit? target-pico? target-pico2? target-stm32h753zi?
cortex-m none target-microbit? target-pico? target-pico2? target-stm32h753zi?
cortex-m-rt none target-microbit? target-pico? target-pico2? target-stm32h753zi?