From 5c265bb59f39b5544b06e0e88bac9bd8b341a399 Mon Sep 17 00:00:00 2001 From: altair823 Date: Tue, 19 May 2026 15:38:19 +0000 Subject: [PATCH] build(p10-1a-2): add tree-sitter + tree-sitter-rust workspace deps Co-Authored-By: Claude Opus 4.7 (1M context) --- Cargo.lock | 39 ++++++++++++++++++++++++++++++ Cargo.toml | 4 +++ crates/kebab-parse-code/Cargo.toml | 6 +++-- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f330c3b..37c7e24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4346,6 +4346,8 @@ dependencies = [ "anyhow", "gix", "tempfile", + "tree-sitter", + "tree-sitter-rust", ] [[package]] @@ -7367,6 +7369,7 @@ version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ + "indexmap 2.14.0", "itoa", "memchr", "serde", @@ -7731,6 +7734,12 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51f1e89f093f99e7432c491c382b88a6860a5adbe6bf02574bf0a08efff1978" +[[package]] +name = "streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" + [[package]] name = "strsim" version = "0.11.1" @@ -8495,6 +8504,36 @@ dependencies = [ "tracing-serde", ] +[[package]] +name = "tree-sitter" +version = "0.26.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "887bd495d0582c5e3e0d8ece2233666169fa56a9644d172fc22ad179ab2d0538" +dependencies = [ + "cc", + "regex", + "regex-syntax", + "serde_json", + "streaming-iterator", + "tree-sitter-language", +] + +[[package]] +name = "tree-sitter-language" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782" + +[[package]] +name = "tree-sitter-rust" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439e577dbe07423ec2582ac62c7531120dbfccfa6e5f92406f93dd271a120e45" +dependencies = [ + "cc", + "tree-sitter-language", +] + [[package]] name = "try-lock" version = "0.2.5" diff --git a/Cargo.toml b/Cargo.toml index 7b2527c..5d0ef62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,6 +86,10 @@ base64 = "0.22" # No `git` binary required. Default features include thread-safety + most # object-reading capabilities needed for HEAD name + commit SHA queries. gix = { version = "0.70", default-features = false, features = ["revision"] } +# Rust source parsing for code ingest (kebab-parse-code, p10-1A-2). The +# chunker stays tree-sitter-free — AST work is parser-side per design §6.3. +tree-sitter = "0.26" +tree-sitter-rust = "0.24" # Disk-footprint trim for dev / test builds. Codegen, opt-level, and # behavior are unchanged — only DWARF debug info is reduced (line diff --git a/crates/kebab-parse-code/Cargo.toml b/crates/kebab-parse-code/Cargo.toml index ad6aef5..482ae12 100644 --- a/crates/kebab-parse-code/Cargo.toml +++ b/crates/kebab-parse-code/Cargo.toml @@ -8,8 +8,10 @@ repository = { workspace = true } description = "Language-aware code parsing infrastructure (lang dispatch, .git/ detect, skip helpers) for the kebab pipeline (P10-1A-1)" [dependencies] -anyhow = { workspace = true } -gix = { workspace = true } +anyhow = { workspace = true } +gix = { workspace = true } +tree-sitter = { workspace = true } +tree-sitter-rust = { workspace = true } [dev-dependencies] tempfile = { workspace = true }