A modern, cross-platform G-Code sender built with Rust and Tauri, inspired by Universal G-Code Sender.
- Cross-Platform: Works on Windows, macOS, and Linux
- Modern Architecture: Built with Rust for performance and safety
- Tauri GUI: Lightweight, fast UI using web technologies
- GRBL Support: Full support for GRBL firmware
- Serial Communication: Robust serial port handling with tokio-serial
- Real-time Status: Live machine position and status updates (200ms polling)
- Jogging: Incremental and continuous jogging support (X/Y/Z axes)
- Homing: Support for homing cycles
- Alarm Management: Handle and clear alarms
- G-Code Streaming: Send G-code files with automatic flow control
- Interactive 3D Viewer: Real-time G-code toolpath visualization using Three.js
- Toolpath Preview: Automatic rendering of G0/G1 movement commands
- Gradient Coloring: Visual progression from blue (start) to cyan (end)
- Machine Position: Real-time 3D indicator showing current position
- Camera Controls: Orbit, zoom, and pan with mouse
- View Modes: Quick access to Top, Front, Side, and Isometric views
- Coordinate Axes: Color-coded XYZ axes (Red/Green/Blue)
- Reference Grid: Ground plane for spatial reference
- Bounds Display: Automatic workpiece dimension calculation
- Hardware Accelerated: WebGL rendering at 60 FPS
- Progress Bars: Real-time visual progress tracking with percentage display
- File Validation: Pre-flight G-code file validation with error detection
- Time Estimation: Estimated job duration based on command count
- Elapsed Time: Live elapsed time tracking during job execution
- Job History: Comprehensive history with status, duration, and timestamps
- Streaming Controls: Start/Pause/Resume/Cancel functionality
- Modern Design: Responsive UI with color-coded status indicators
- 115 Passing Tests: Comprehensive test suite with 100% success rate
- Mock Testing: Mock serial ports for unit testing
- Integration Tests: Full workflow testing scenarios
- Edge Case Coverage: Extensive edge case testing
The project is organized into the following modules:
model/: Core data types (Position, Units, Axis, Alarm)communication/: Serial and network communication layercontroller/: Controller implementations (GRBL, TinyG, etc.)gcode/: G-code parsing and command generationlisteners/: Event system for controller state changesfirmware/: Firmware-specific settings and capabilitiesutils/: Utility functions and helpers
Tauri application with command handlers for:
- Connection management
- Status queries
- Machine control (homing, jogging, etc.)
- G-code sending
Modern HTML/CSS/JavaScript interface with:
- 3D Toolpath Viewer with interactive controls (NEW!)
- Connection panel with port selection
- Machine status display with live updates
- Jog controls with customizable distance/feed rate
- File selection with validation (Task 6)
- Progress tracking with visual bars (Task 6)
- Job history panel (Task 6)
- G-code command input
- Console for messages and feedback
- Rust 1.70 or higher
- Node.js (for Tauri)
- Platform-specific dependencies for Tauri
cargo buildcargo build --releasecargo run# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific test module
cargo test communication::Tests are located in the tests/ directory, organized by module.
-
Connect to Machine
- Select serial port from dropdown
- Choose baud rate (default: 115200)
- Click "Connect"
-
Home Machine
- Click "Home" button to run homing cycle
-
Jog Machine
- Set feed rate and distance
- Use directional buttons (X+/-, Y+/-, Z+/-)
-
Send G-Code
- Type command in input field
- Press Enter or click "Send Command"
-
Reset Zero
- Click "Reset Zero" to set current position as origin
| Feature | UGS (Java) | GCodeKit (Rust) |
|---|---|---|
| Language | Java | Rust |
| GUI Framework | NetBeans Platform/Swing | Tauri (HTML/CSS/JS) |
| Serial Library | JSSC/JSerialComm | tokio-serial |
| Memory Usage | Higher | Lower |
| Startup Time | Slower | Faster |
| Binary Size | Larger (with JRE) | Smaller |
GPL-3.0 (same as Universal G-Code Sender)
Contributions are welcome! Please ensure:
- Code follows Rust best practices
- Tests are included for new features
- Documentation is updated
- Commit messages are descriptive
This project is inspired by and based on Universal G-Code Sender by Will Winder and contributors.
- Basic GRBL controller support
- Serial communication
- Jogging controls
- Homing cycle
- Status reporting
- G-code file streaming
- 3D visualization
- TinyG/g2core support
- Smoothieware support
- Macro support
- Probe operations
- Advanced jogging (continuous, keyboard)
- Work coordinate systems (G54-G59)
- Tool length offset
- Feed/spindle overrides
- Currently only supports GRBL firmware
- Limited testing on all platforms
For issues and questions:
- Open an issue on GitHub
- Check the documentation in
docs/ - Refer to Universal G-Code Sender documentation for G-code help