承接 kreuzberg/tree-sitter-language-pack 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kreuzberg/tree-sitter-language-pack

最新稳定版本:1.8.1

Composer 安装命令:

pie install kreuzberg/tree-sitter-language-pack

包简介

Pre-compiled tree-sitter parsers for 305 programming languages with PHP extension bindings. Parse, analyze, and chunk source code with a single process() call.

README 文档

README

tree-sitter-language-pack

Rust Python Node Wasm Java Go Csharp Php Ruby Elixir Docker Ffi CI License Homebrew Docs Banner Discord

A comprehensive collection of tree-sitter language parsers with polyglot bindings

Overview

tree-sitter-language-pack bundles 305+ tree-sitter language parsers into a single package with native bindings for multiple programming languages. Ship syntax analysis in your application without managing individual parser dependencies.

Architecture

tree-sitter-language-pack/
├── crates/
│   ├── ts-pack-core/       # Rust core library
│   ├── ts-pack-python/     # Python (maturin/PyO3) bindings
│   ├── ts-pack-node/       # Node.js (NAPI-RS) bindings
│   ├── ts-pack-java/       # Java (Panama FFI) bindings
│   ├── ts-pack-elixir/     # Elixir (Rustler NIF) bindings
│   ├── ts-pack-ffi/        # C-compatible FFI library
│   └── ts-pack-cli/        # CLI tool
├── packages/
│   └── go/v1/              # Go (cgo) bindings
├── grammars/               # Tree-sitter grammar sources
└── scripts/                # Build and maintenance scripts

Quick Start

Rust

cargo add tree-sitter-language-pack

See Rust README for full documentation.

Python

pip install tree-sitter-language-pack
uv add tree-sitter-language-pack

See Python README for full documentation.

Node.js

npm install @kreuzberg/tree-sitter-language-pack
pnpm add @kreuzberg/tree-sitter-language-pack
yarn add @kreuzberg/tree-sitter-language-pack

See Node.js README for full documentation.

Go

go get github.com/kreuzberg-dev/tree-sitter-language-pack/packages/go

See Go README for full documentation.

Java

<dependency>
  <groupId>dev.kreuzberg.treesitterlanguagepack</groupId>
  <artifactId>tree-sitter-language-pack</artifactId>
  <version>1.8.0</version>
</dependency>
implementation("dev.kreuzberg.treesitterlanguagepack:tree-sitter-language-pack:1.8.0")

See Java README for full documentation.

Elixir

{:tree_sitter_language_pack, "~> 1.0"}

See Elixir README for full documentation.

Ruby

gem install tree_sitter_language_pack

See Ruby README for full documentation.

WebAssembly

npm install @kreuzberg/tree-sitter-language-pack-wasm
pnpm add @kreuzberg/tree-sitter-language-pack-wasm
yarn add @kreuzberg/tree-sitter-language-pack-wasm

See WebAssembly README for full documentation.

PHP

composer require kreuzberg/tree-sitter-language-pack

See PHP README for full documentation.

.NET (C#)

dotnet add package TreeSitterLanguagePack

See .NET (C#) README for full documentation.

C/C++ (FFI)

Build from source as part of this workspace.

See C/C++ (FFI) README for full documentation.

CLI

cargo install ts-pack-cli

See CLI README for full documentation.

Core API

All bindings expose a unified process() function for extracting structured intelligence from source code:

Language Function
Rust ts_pack_core::process(source, &config)
Python process(source, ProcessConfig(...))
Node.js process(source, { language: '...' })
Go registry.Process(source, config)
Java registry.process(source, configJson)
Ruby TreeSitterLanguagePack.process(source, configJson)
Elixir TreeSitterLanguagePack.process(source, configJson)
WASM process(source, { language: '...' })
C FFI ts_pack_process(registry, source, len, configJson)

The process() function returns structured analysis including functions, classes, imports, comments, and optionally chunked source segments.

Features

Feature Description
305+ Languages Pre-compiled parsers for 305+ programming languages
On-Demand Downloads Parsers are downloaded on-demand and cached locally for fast reuse
Selective Installation Download only the languages you need; unused parsers never downloaded
Polyglot Bindings Native bindings for Rust, Python, Node.js, Go, Java, Elixir, and C/C++
Automatic Caching Downloaded parsers cached in platform-specific directories for offline use
CLI Tool ts-pack download to pre-download parsers for offline/CI/Docker use

Supported Languages

This pack includes 305+ languages. See the full language list for all supported grammars with extensions and repository links.

Package READMEs

  • Rust -- Rust core library providing access to 305 tree-sitter parsers with on-demand download and caching support.
  • Python -- Python bindings for tree-sitter-language-pack, providing access to 305 pre-compiled tree-sitter parsers with on-demand downloads.
  • Node.js -- Node.js NAPI bindings for tree-sitter-language-pack with on-demand parser downloads.
  • Go -- Go bindings for tree-sitter-language-pack with on-demand parser caching.
  • Java -- Java bindings for tree-sitter-language-pack with on-demand parser downloads (JDK 22+).
  • Elixir -- Elixir bindings for tree-sitter-language-pack with on-demand parser downloads.
  • Ruby -- Ruby bindings for tree-sitter-language-pack with on-demand parser downloads.
  • WebAssembly -- WebAssembly bindings for tree-sitter-language-pack. Includes a curated subset of 30 languages optimized for browser and edge runtimes. For all 305 languages, use native bindings (Python, Node.js, etc.).
  • PHP -- PHP extension via ext-php-rs with on-demand parser downloads.
  • .NET (C#) -- .NET P/Invoke bindings with on-demand parser downloads.
  • C/C++ (FFI) -- C-compatible FFI bindings for tree-sitter-language-pack. Use from any language with C interop.
  • CLI -- Command-line tool for managing tree-sitter language parsers with download utilities.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Join our Discord community for questions and discussion.

License

MIT -- see LICENSE for details.

All included tree-sitter grammars are permissively licensed (MIT, Apache-2.0, BSD, ISC, or similar). Copyleft licenses (GPL, AGPL, LGPL, MPL) are not accepted. See CONTRIBUTING.md for grammar inclusion criteria.

kreuzberg/tree-sitter-language-pack 适用场景与选型建议

kreuzberg/tree-sitter-language-pack 是一款 基于 Rust 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 354, 最近一次更新时间为 2026 年 03 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「performance」 「parser」 「syntax」 「ast」 「rust」 「php8」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 kreuzberg/tree-sitter-language-pack 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 kreuzberg/tree-sitter-language-pack 我们能提供哪些服务?
定制开发 / 二次开发

基于 kreuzberg/tree-sitter-language-pack 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 354
  • 点击次数: 37
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 354
  • Watchers: 5
  • Forks: 58
  • 开发语言: Rust

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-16