# G-Code visualizer in Rust This [[G-Code]] visualizer in [[Rust]] comes to scratch an itch: - I am not able to use [[cura]] 5.1 for my [[Elegoo Neptune 2S]] printer, because it seems to generate bad [[G-Code]] compared to the [[cura]] 4.8 version provided by [[Elegoo]]. All the settings seem to be the same. - Wanting to investigate the resulting [[G-Code]], I realize that I can't actually read G-Code, especially because so many operands are [[Marlin Firmware]] specific - I wanted a small TUI tool to annotate, edit and understand the G-Code files in order to understand what settings to adjust All the [[Marlin Firmware]] G-Code operands are document in the marlin repository as [[Markdown]], which I was easily able to parse in [[Rust]], and can easily use to augment the G-Code visualization. Github: [GitHub - wesen/gcode-viz: Visualize Marlin GCode along with documentation](https://github.com/wesen/gcode-viz) ## Progress So far, I stopped at going through some overcomplicated tutorial on making a [[Terminal UI]] in [[Rust]] using the [GitHub - fdehau/tui-rs: Build terminal user interfaces and dashboards using Rust](https://github.com/fdehau/tui-rs) library: [MonkeyPatch | Rust: Playing with tui-rs](https://monkeypatch.io/blog/2021/2021-05-31-rust-tui/) . It is based on the spotify command line client, and uses threads, a weird amount of wrappers around input events and keys, and overall confused me because I haven't derived the structure of the application myself. ## Links This seems to have pretty cool TUI examples, that are less confusing than the spotify UI article above. - [GitHub - KatsukiFujimoto/tui-rs-tutorial](https://github.com/KatsukiFujimoto/tui-rs-tutorial)