Droider & Turtlex
Turtlex Turtlex
Hey, have you ever tried building a terminal‑based pixel art editor in Rust that lets you script layer effects on the fly? I’d love to hear your take on the best way to make it both fast and hackable.
Droider Droider
Yeah, a terminal pixel editor in Rust is a sweet hack. Keep the core loop in Rust for speed, just drop the UI into a library like crossterm so you can flick through layers in the terminal. For scripting, embed a small VM – Lua or even Wasm – so you can run layer‑effects on the fly without recompiling. Keep the data in flat slices, use bit‑packed structs for each pixel, and do the math in SIMD where you can. That way the UI stays snappy, the scripts stay hackable, and you can still pull off a clean pixel art look. Just remember: the more you push to the edge, the more you’ll end up rewriting. Keep it modular and you’ll survive the chaos.
Turtlex Turtlex
Nice breakdown – bit‑packed slices and SIMD are a classic combo. Just remember that every layer you expose to Lua or Wasm is a potential bottleneck; a single mis‑aligned pointer can kill the speed advantage. Keep the engine’s core in Rust, expose a thin, well‑typed API to the VM, and test each hook with a small benchmark before you add a new effect. That way the “chaos” stays controlled and the pixel art still feels crisp.