* feat: add native Rust output truncation module Line-boundary-aware truncation for tool outputs (bash, grep, file reads), replacing JS byte-counting with native Rust via napi-rs. Supports head, tail, and both modes. Counts by UTF-8 bytes, respects line boundaries, uses memchr for fast newline scanning. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: remove unsafe blocks and fix truncation message byte counts Replace unsafe from_utf8_unchecked with safe from_utf8().expect() — the invariant (splitting at newline boundaries) is sound but the perf difference is negligible, so no reason to use unsafe. Fix truncateOutput messages that reported the byte budget as "bytes truncated" instead of the actual number of bytes removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
1 KiB
TOML
43 lines
1 KiB
TOML
[package]
|
|
name = "gsd-engine"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
repository.workspace = true
|
|
description = "N-API native addon for GSD — exposes high-performance Rust modules to Node.js"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
gsd-ast = { path = "../ast" }
|
|
gsd-grep = { path = "../grep" }
|
|
arboard = "3"
|
|
dashmap = "6"
|
|
globset = "0.4"
|
|
html-to-markdown-rs = { version = "2", default-features = false }
|
|
ignore = "0.4"
|
|
memchr = "2"
|
|
image = { version = "0.25", default-features = false, features = [
|
|
"png",
|
|
"jpeg",
|
|
"gif",
|
|
"webp",
|
|
] }
|
|
napi = { version = "2", features = ["napi8"] }
|
|
napi-derive = "2"
|
|
regex = "1"
|
|
serde_json = "1"
|
|
similar = "2"
|
|
smallvec = "1"
|
|
syntect = { version = "5", default-features = false, features = ["default-syntaxes", "default-themes", "regex-fancy"] }
|
|
unicode-segmentation = "1"
|
|
unicode-width = "0.2"
|
|
xxhash-rust = { version = "0.8", features = ["xxh32"] }
|
|
|
|
[build-dependencies]
|
|
napi-build = "2"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2"
|