Safety First
Built-in validation catches errors before they reach your machine. Tool collision detection, feed rate validation, and workspace boundary checks protect your equipment.
A human-readable, type-safe language for CNC programming with built-in safety, validation, and optimization
Here's a simple GScript program that drills three holes:
tool drill_3mm {
diameter: 3.0,
flutes: 2,
max_rpm: 15000,
}
drill {
tool: drill_3mm,
locations: [(10, 10), (20, 10), (30, 10)],
depth: 5.0,
feed: 300.0,
}Compare this to the equivalent G-code:
G90 G21
G0 Z5.0
S15000 M3
G0 X10 Y10
G1 Z-5.0 F300
G0 Z5.0
G0 X20 Y10
G1 Z-5.0 F300
G0 Z5.0
G0 X30 Y10
G1 Z-5.0 F300
G0 Z5.0
M5GScript validates your programs at compile time. Tool dimensions, feed rates, and coordinates are all checked before generating G-code.
Use high-level operations like face, drill, pocket, and contour instead of manually calculating toolpaths.
Target different CNC controllers without rewriting your programs. GScript handles the dialect differences automatically.
Get machining time estimates, material removal calculations, and cost breakdowns without external tools.
Install GScript using cargo:
cargo install gscriptOr download pre-built binaries from the releases page.
Then write your first program:
gscript compile my-program.gs --backend grblCheck out the Getting Started Guide for a complete walkthrough.
GScript is open source software released under the Apache License 2.0.