Compare commits
1 Commits
7fc76f0ad1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
791b5135f4
|
@@ -4,7 +4,7 @@ Shared, dependency-light building blocks used across the Continuum cloud and edg
|
|||||||
|
|
||||||
## Packages
|
## Packages
|
||||||
|
|
||||||
- **`packages/ts-core`** — TypeScript package consumed by `continuum-backend` (and other Bun/Node services). Provides a structured logger, a Supabase JWT verification helper, and ElysiaJS-compatible HTTP error transformers.
|
- **`packages/ts-core`** - TypeScript package consumed by `continuum-backend` (and other Bun/Node services). Provides a structured logger, a Supabase JWT verification helper, and ElysiaJS-compatible HTTP error transformers.
|
||||||
- **`packages/rust-core`** — Rust crate consumed by `continuum-proxy` and `continuum-ai-worker`. Provides a shared `thiserror`-based error type, `tracing` initialization, and G-code checksum/header parsing helpers.
|
- **`packages/rust-core`** - Rust crate consumed by `continuum-proxy` and `continuum-ai-worker`. Provides a shared `thiserror`-based error type, `tracing` initialization, and G-code checksum/header parsing helpers.
|
||||||
|
|
||||||
Each package is versioned and published independently; see their own READMEs (inline doc comments) for usage.
|
Each package is versioned and published independently; see their own READMEs (inline doc comments) for usage.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
/// XORs every byte together — the standard Marlin/RepRap G-code checksum.
|
/// XORs every byte together - the standard Marlin/RepRap G-code checksum.
|
||||||
/// Covers everything before the `*`, including a leading `N<n> ` line number
|
/// Covers everything before the `*`, including a leading `N<n> ` line number
|
||||||
/// if present.
|
/// if present.
|
||||||
pub fn compute_checksum(data: &[u8]) -> u8 {
|
pub fn compute_checksum(data: &[u8]) -> u8 {
|
||||||
@@ -38,7 +38,7 @@ pub fn append_checksum(line: &str) -> String {
|
|||||||
/// settings this way at the top of the file.
|
/// settings this way at the top of the file.
|
||||||
///
|
///
|
||||||
/// This only handles that one format. Real slicer output has more variety
|
/// This only handles that one format. Real slicer output has more variety
|
||||||
/// (Cura's `;KEY:value` style, free-form "generated by ..." comments) —
|
/// (Cura's `;KEY:value` style, free-form "generated by ..." comments) -
|
||||||
/// add support for those once this simple version makes sense.
|
/// add support for those once this simple version makes sense.
|
||||||
pub fn parse_header(gcode: &str) -> BTreeMap<String, String> {
|
pub fn parse_header(gcode: &str) -> BTreeMap<String, String> {
|
||||||
let mut fields = BTreeMap::new();
|
let mut fields = BTreeMap::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user