rustscript-embedded 0.1.0

Embedded-facing RustScript runner examples with JIT disabled
Documentation
  • Coverage
  • 0%
    0 out of 17 items documented0 out of 8 items with examples
  • Size
  • Source code size: 31.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 814.29 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • fffonion

rustscript-embedded

Embedded-facing RustScript runner samples. The host crate uses pd-vm with default-features = false and only the runtime feature, so the CLI, protocol host layers, and Cranelift JIT dependencies are left out. Runtime instances are created with JitConfig { enabled: false, .. }.

Host examples

cargo run --example run_file -- programs/blinky.rss
printf 'print(1 + 2);\n.quit\n' | cargo run --example repl

Raspberry Pi Zero bare-metal scenario

The board scenario targets Raspberry Pi Zero revision 1.2: BCM2835 with ARM1176JZF-S, booted without an OS under QEMU's raspi0 machine.

ci/run-qemu-raspi0.sh
ci/measure-size.sh

The firmware in ports/raspi-zero/ contains a tiny frozen-program interpreter for a RustScript-flavored bytecode form of programs/blinky.rss. It prints over the BCM2835 PL011 UART and has no JIT path.

CI shape borrowed from MicroPython

MicroPython keeps a central tools/ci.sh, has per-port workflows, runs QEMU ports across ARM/RISC-V boards, and has a separate code-size workflow based on tools/metrics.py. This project mirrors that shape at a small scale:

  • host job: format, clippy, tests, native example smoke
  • target job: install arm-none-eabi + QEMU, build the Raspberry Pi Zero bare-metal firmware, run it under QEMU
  • size step: report ELF section footprint and raw image bytes

Size controls

Host min-size profile uses:

  • opt-level = "z"
  • lto = "fat"
  • codegen-units = 1
  • panic = "abort"
  • strip = "symbols"

The Pi Zero firmware uses -Os, -ffunction-sections, -fdata-sections, -nostdlib, and linker --gc-sections.