uni-cli 0.0.12

Command-line REPL and interpreter for the Uni programming language
[package]
name = "uni-cli"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
description = "Command-line REPL and interpreter for the Uni programming language"
repository = "https://github.com/edadma/uni"
readme = "README.md"
keywords = ["repl", "interpreter", "stack", "language", "embedded"]
categories = ["command-line-utilities", "development-tools"]

[[bin]]
name = "uni"
path = "src/main.rs"

[dependencies]
uni-core = { version = "0.0.12", path = "../uni-core", default-features = false }
editline = { version = "0.0.20", default-features = false }

# Pico-specific optional dependencies
rp2040-hal = { version = "0.10", features = ["rt", "critical-section-impl"], optional = true }
rp2040-boot2 = { version = "0.3", optional = true }

# Pico 2-specific optional dependencies
rp235x-hal = { version = "0.3", features = ["rt", "critical-section-impl"], optional = true }

# USB dependencies (shared by both Pico and Pico 2)
usb-device = { version = "0.3", optional = true }
usbd-serial = { version = "0.2", optional = true }

# STM32H753ZI-specific optional dependencies
embassy-stm32 = { version = "0.4.0", features = ["time-driver-any", "exti", "memory-x"], optional = true }
embassy-executor = { version = "0.9.0", features = ["arch-cortex-m", "executor-thread"], optional = true }
embassy-usb = { version = "0.5.1", optional = true }
embassy-time = { version = "0.5.0", optional = true }
embassy-futures = { version = "0.1.0", optional = true }
defmt = { version = "0.3", optional = true }
defmt-rtt = { version = "0.4", optional = true }
panic-probe = { version = "0.3", features = ["print-defmt"], optional = true }

[features]
# Default: full-featured Linux build
default = ["target-linux", "std", "advanced_math", "complex_numbers"]

# Target selection (mutually exclusive - pick ONE)
target-linux = ["uni-core/std", "uni-core/repl", "editline/std"]
# micro:bit has only 128KB SRAM - keep features minimal to avoid memory issues
target-microbit = ["uni-core/hardware-microbit", "uni-core/repl", "editline/microbit", "microbit", "embedded-hal", "cortex-m", "cortex-m-rt", "panic-halt", "alloc-cortex-m"]
# Pico has 264KB SRAM - sufficient for advanced features (REPL only, no GPIO)
target-pico = ["uni-core/target-pico", "uni-core/repl", "editline/rp_pico_usb", "rp2040-hal", "rp2040-boot2", "usb-device", "usbd-serial", "cortex-m", "cortex-m-rt", "panic-halt", "alloc-cortex-m", "advanced_math", "complex_numbers"]
# Pico 2 has 520KB SRAM - plenty of room for all features (REPL + GPIO)
target-pico2 = ["uni-core/hardware-pico2", "uni-core/repl", "editline/rp_pico2_usb", "rp235x-hal", "usb-device", "usbd-serial", "cortex-m", "cortex-m-rt", "panic-halt", "alloc-cortex-m", "advanced_math", "complex_numbers"]
# STM32H753ZI has 1MB RAM - full features with async Embassy runtime (no uni-core/repl - uses async implementation in uni-cli)
target-stm32h753zi = ["uni-core/target-stm32h753zi", "editline/stm32h753zi", "embassy-stm32", "embassy-executor", "embassy-usb", "embassy-time", "embassy-futures", "cortex-m/critical-section-single-core", "cortex-m-rt", "defmt", "defmt-rtt", "panic-probe", "alloc-cortex-m", "advanced_math", "complex_numbers"]

# Optional features (passed through to uni-core)
std = ["uni-core/std"]
advanced_math = ["uni-core/advanced_math"]
complex_numbers = ["uni-core/complex_numbers"]

# Embedded target dependencies (target_os = "none") - made optional
[target.'cfg(target_os = "none")'.dependencies]
embedded-hal = { version = "1.0", optional = true }
cortex-m = { version = "0.7", optional = true }
cortex-m-rt = { version = "0.7", optional = true }
panic-halt = { version = "0.2", optional = true }
alloc-cortex-m = { version = "0.4", optional = true }

# micro:bit-specific dependencies (only with target-microbit feature)
microbit = { package = "microbit-v2", version = "0.15", optional = true }