A third implementation of the track DSL alongside engine.js and app.py, validated against the same tests/fixtures/track-format.json: - rust/track-format/: pure parse()/serialize() codec (std + alloc for now; no_std is a later refinement). Ports the app.py/engine.js semantics exactly — grouping, subdivisions, swing, ghost, polymeter, euclid, GM note-number aliases, unknown->beep, default groove (group-start accents), tempo clamp, empty->beep, and the playback-flow tokens (rep/end/relative-goto). Carries vol/cd too, so it's the most spec-complete of the three. - tests/conformance.rs: the Rust adapter — reads the shared fixtures, asserts each case's normalized form (number-tolerant deep-equal) + serialize idempotency. - rust/Containerfile + run.sh: Rust toolchain in a container (mirrors hardware/eda/), with the thumbv8m.main-none-eabihf target for the eventual RP2350 firmware. Never on the host. Verified: ./rust/run.sh -> cargo test -> conformance + idempotent both pass. docs/rust-port.md Stage 1 marked done. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8 lines
345 B
Docker
8 lines
345 B
Docker
# Rust toolchain for the PM track-format crate (Stage 1 of the Rust port).
|
|
# Host-tested codec for now; the RP2350 firmware target is added for later stages.
|
|
FROM docker.io/library/rust:1-slim
|
|
|
|
# Cortex-M33 target for the eventual RP2350 firmware. Harmless for the host tests.
|
|
RUN rustup target add thumbv8m.main-none-eabihf
|
|
|
|
WORKDIR /work/rust
|