Skip to main content

raydriver

Rust-native machine drivers for Rayforge, exposed to Python via PyO3.

Currently this provides a full port of Rayforge's advanced GRBL serial driver: character-counting flow control, handshake and status polling, interactive command queue, job streaming with stall detection and deadlock recovery, cancel/safety-shutdown semantics, settings and WCS access, and probe cycles. Dialects (command templates) remain data owned by Rayforge and are passed in resolved form.

CLI

The raydriver command runs G-code against a real device with live progress, or against the built-in firmware emulator for hardware-free dry runs:

raydriver run job.gcode --port /dev/ttyUSB0 --baudrate 115200
raydriver run job.gcode --emulator          # no hardware needed
raydriver status --port /dev/ttyUSB0 --seconds 5

While a job runs, raydriver run shows acknowledged lines, a progress bar, the device state, machine position, feed rate and ETA; Ctrl-C cancels the job and runs the safety shutdown.

Releases

Releasing mirrors the Raygeo flow:

  1. Configure a PyPI trusted publisher for this repository once (owner barebaric, repo raydriver, workflow release.yml, environment pypi).
  2. gh release create v0.1.0 --title "v0.1.0" --generate-notes

The Build and Publish workflow then stamps the version from the tag, builds wheels (Linux/Windows/macOS) and an sdist, publishes to PyPI via OIDC, and attaches the artifacts to the GitHub release.

Development

make venv && source .venv/bin/activate
make dev     # build + install (do this before testing)
make test    # pytest suite (all tests are Python-based)
make check   # lint + test

Usage

import asyncio
from raydriver.grbl import GrblSession, SessionEvent

session = GrblSession(
    config={"port": "/dev/ttyUSB0", "baudrate": 115200},
    dialect={
        "home_all": "$H",
        "home_axis": "$H{axis_letter}",
        "clear_alarm": "$X",
        "laser_on": "M4 S{power:.0f}",
        "laser_off": "M5",
    },
    event_callback=on_event,
)

def on_event(event: SessionEvent):
    match event:
        case SessionEvent.StateChanged():
            print("device state:", event.state.status.name)
        case SessionEvent.ConnectionStatusChanged(status=status):
            print("connection:", status)
        case SessionEvent.RawRx(line=line):
            print("<<", line)
        case SessionEvent.RawTx(line=line):
            print(">>", line)

async def main():
    await session.connect()
    print(await session.execute_interactive_command("$I"))
    await session.disconnect()

asyncio.run(main())

Metadata

Release files for raydriver 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for raydriver 0.5.0
File Size Uploaded Provenance Actions
raydriver-0.5.0.tar.gz 94.1 kB With provenance Details for raydriver-0.5.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for raydriver 0.5.0
File Actions
raydriver-0.5.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for raydriver-0.5.0-cp311-abi3-win_amd64.whl
raydriver-0.5.0-cp311-abi3-manylinux_2_34_x86_64.whl CPython 3.11 abi3 Linux glibc 2.34+ x86-64 Details for raydriver-0.5.0-cp311-abi3-manylinux_2_34_x86_64.whl
raydriver-0.5.0-cp311-abi3-manylinux_2_34_aarch64.whl CPython 3.11 abi3 Linux glibc 2.34+ ARM64 Details for raydriver-0.5.0-cp311-abi3-manylinux_2_34_aarch64.whl
raydriver-0.5.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for raydriver-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
raydriver-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for raydriver-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 8.2 MB

Release files / raydriver-0.5.0.tar.gz

Download URL raydriver-0.5.0.tar.gz
Size 94.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1176aff89fe97230a2565e987cbcaf63dddd0ee4e997f5ecd8103e0752aa9b4c
BLAKE2b-256 checksum
How to use checksums
0a97a6f94b0ab3e1dc61a4d7652fcbd231a3a3753e1e0616e4e2a0207ec240c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / raydriver-0.5.0-cp311-abi3-win_amd64.whl

Download URL raydriver-0.5.0-cp311-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f6a567e9f9f372961fe9185dea58c018cc50a883dae5f1a6e439bf5bf2aa4435
BLAKE2b-256 checksum
How to use checksums
e968f02b1d12823d22ae95029ae33826c790b6d094264e091101f5f2c96a39a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / raydriver-0.5.0-cp311-abi3-manylinux_2_34_x86_64.whl

Download URL raydriver-0.5.0-cp311-abi3-manylinux_2_34_x86_64.whl
Size 1.7 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
f86e8cead76c81109dca59cf819997af7ec36e912d9da26a7df6dea41159a0e6
BLAKE2b-256 checksum
How to use checksums
8c2e4768db2c3157e617c0466cfacbfd2c86cc28624d6b8187f339ee32a75668
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / raydriver-0.5.0-cp311-abi3-manylinux_2_34_aarch64.whl

Download URL raydriver-0.5.0-cp311-abi3-manylinux_2_34_aarch64.whl
Size 1.7 MB
Tags CPython 3.11 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
4dfd92e0bc435b5d1dc555bc2f16d069cb48d775da6034b265619d7ba6ba524e
BLAKE2b-256 checksum
How to use checksums
47e8efa5fce2176bfe270a2560cabca3aea0e6b3c29282c117a08fbdc32d467c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / raydriver-0.5.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL raydriver-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
601697e2c3fed3faaa43a211daf7ec41f2acf1bb6bc2f05a312199ebbf6c309f
BLAKE2b-256 checksum
How to use checksums
cba1b285a8eb89406bb93c113afb4a21ac20ebe6de69c08c4a07edf241cfb6f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / raydriver-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL raydriver-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.6 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
84f35323c255656d3278477e2243570c5a22cc7e9a5ac6a281e4f2fb36e04ca9
BLAKE2b-256 checksum
How to use checksums
38b524a1ce8c5f0caec4c534a0ec8ef75e0f6be9e671f5ba1875198b08435744
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for raydriver 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for raydriver-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.0 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page