Giter Site home page Giter Site logo

ithinuel / async-gcode Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 4.0 132 KB

A simple gcode parser written in rust

Home Page: https://crates.io/crates/async-gcode

License: MIT License

Rust 21.01% G-code 78.62% Shell 0.37%
gcode 3d-printing rust-lang stream parser cnc-machine

async-gcode's Introduction

GCode Parser

This crate aims at providing a gcode parser to the rusty printer project (and other if it can fit).

The minimal footprint is achieved with all features disabled and is in the order of ~80B of RAM and around 2kB of Flash memory. The typical set of features ["parse-trailing-comment", "parse-checksum", "optional-value"] has a footprint of around 4kB of flash memory for around 80B of RAM. Finally with all features, the memory footprint reaches around 7kB in flash and around 170B in RAM.

Features

  • std : Enabled by default
  • parse-comments : enables the parser to return GCode::Comment(String); requires an allocator.
  • parse-trailing-comment: allows line to end with a ; comment.
  • parse-checksum : Enables the use of xorsum.
  • parse-parameters : Enables the use of # parameters ; requires an allocator. If string-value is enabled then parameters may use string index. If optional-value is enabled then parameters value may be omitted but NOT the indices.
  • parse-expressions : Enables parsing infix expressions ; requires an allocator.
  • optional-value : Allows to omit in RealValue in word and parameter value positions. Parameter indices cannot be omitted nor can be literals in expressions.
  • string-value : Allows RealValue to be a string. Any character preceded with \ will be used as is (useful for ", ) or new line).

Design

Constraints

  • No recursion.
  • Reduced RAM footprint
  • Reduced ROM footprint

async-gcode's People

Contributors

ithinuel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.