Electronics and hardware
Buraaq is a native LLVM language. Boards should feel as simple as a CLI.
The happy path
module main
use std.led.{on, off, wait}
fn main() {
while true {
on()
wait(200)
off()
wait(200)
}
}
buraaq new blink --board pico_w
cd blink
buraaq run # try on your PC (prints LED on/off)
buraaq flash # hold BOOTSEL, plug USB — real LED
No extern, no vendor SDK in your tree, no CMake in the project. Complexity stays in the toolchain (std.led + buraaq flash board packs).
What the language still gives you
- Deterministic drop (no GC jitter on a control loop)
unsafe+extern cwhen you need a custom HAL / CMSIS / register map- Integer types that match the bus (
u8,u16,u32,u64) deferfor pin restore and peripheral teardown
When you drop below std.led
extern c {
fn gpio_set(pin: c.int, high: c.int) -> c.int
fn delay_ms(ms: c.int) -> void
}
fn blink(pin: int) {
unsafe {
gpio_set(pin, 1)
delay_ms(200)
gpio_set(pin, 0)
delay_ms(200)
}
}
Safe Buraaq calls blink. Only the extern file is unsafe. Prefer std.led until you outgrow it.
Honest status
buraaq run is hosted. buraaq flash --board pico_w builds a UF2 with the Pico W activity LED (CYW43). Cross-compiling arbitrary Buraaq to thumb and linking your main as the device entry is the next step: the source shape is already the product.
Next: a firmware sketch.
