diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..50a7e0b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changelog + +## 0.3.0 - 2026-08-04 + +Ported to Rust. + +- Any executable is a scene (see `docs/procedural.md` for the wire + contract). +- The `ghee-render` wheel carries the embedded renderer and the + procedural-scene shim in one package. +- The deb carries the `ghee` command and the Python package in one, per + arch. +- `docs/http.md`: the console's HTTP API. +- u8 data arrays. +- `st7789`: 12-bit colour and partial row updates. +- The H264 fanout fails fast to the client. +- `ghee bench`: the benchmark suite, in the binary. +- `golden --dump` writes the frames out. diff --git a/src/drivers/st7789.rs b/src/drivers/st7789.rs index 0a0b73c..754c9bf 100644 --- a/src/drivers/st7789.rs +++ b/src/drivers/st7789.rs @@ -113,8 +113,7 @@ fn window( fn pack_rgb444(frame: &[u8], out: &mut Vec) { out.clear(); let mut px = frame.chunks_exact(3); - loop { - let Some(a) = px.next() else { break }; + while let Some(a) = px.next() { let b = px.next().unwrap_or(&[0, 0, 0]); out.push((a[0] & 0xF0) | (a[1] >> 4)); out.push((a[2] & 0xF0) | (b[0] >> 4)); diff --git a/src/h264.rs b/src/h264.rs index 3373888..11bd2bd 100644 --- a/src/h264.rs +++ b/src/h264.rs @@ -498,10 +498,7 @@ fn pump(mut stdout: ChildStdout, tx: &SyncSender>) { Ok(n) => n, }; buf.extend_from_slice(&chunk[..n]); - loop { - let Some(first) = find_aud(&buf, 0) else { - break; - }; + while let Some(first) = find_aud(&buf, 0) { let Some(next) = find_aud(&buf, first + 4) else { break; }; diff --git a/src/isf.rs b/src/isf.rs index 84d84a5..372d52b 100644 --- a/src/isf.rs +++ b/src/isf.rs @@ -1064,12 +1064,10 @@ fn boundary(s: &[char], i: usize) -> bool { } fn starts_with(src: &[char], i: usize, pat: &str) -> bool { - let mut k = i; - for c in pat.chars() { - if src.get(k) != Some(&c) { + for (k, c) in pat.chars().enumerate() { + if src.get(i + k) != Some(&c) { return false; } - k += 1; } true } @@ -1225,10 +1223,7 @@ fn find_varying(body: &[char]) -> Option { if hit.is_some() { return hit; } - match body[line..].iter().position(|c| *c == '\n') { - Some(p) => line += p + 1, - None => return None, - } + line += body[line..].iter().position(|c| *c == '\n')? + 1; } }