1 unstable release

0.1.1 May 21, 2024
0.1.0 May 20, 2024

#375 in Embedded development

Download history 10/week @ 2024-09-22 1/week @ 2024-09-29

53 downloads per month

MIT/Apache

62KB
1.5K SLoC

g-code

crates.io g-code g-code codecov

A joint crate for g-code parsing and emission.

Parsing

The parser is written in Rust using peg.

Demo

cargo run --example parse ./tests/vandy_commodores_logo.gcode

Output: https://gist.github.com/sameer/5fe20dad6faa6329926df48b82e68581

Emission

Basic primitives for g-code emission.

Supports formatting, checksum and line number generation.

Demo

See svg2gcode.

TODOs

Parse

  • g-code parameters
  • g-code infix notation

Emit

  • Remaining commonly-used commands (open an issue or create a PR if you need one that's missing)

References

Dependencies