Cargo Features

[dependencies]
pmat = { version = "2.194.0", default-features = false, features = ["all-languages", "most-languages", "rust-only", "polyglot-ast", "ruchy-ast", "go-ast", "java-ast", "csharp-ast", "kotlin-ast", "ruby-ast", "scala-ast", "polyglot-java", "polyglot-kotlin", "polyglot-scala", "polyglot-typescript", "polyglot-javascript", "polyglot-csharp", "polyglot-ruby", "wasm-ast", "deep-wasm", "swift-ast", "skip-slow-tests", "rust-ast", "typescript-ast", "python-ast", "internal_tests", "c-ast", "cpp-ast", "demo", "javascript-ast", "tui", "integration-tests", "e2e-tests", "perf-tests", "rocksdb-backend", "sled-backend", "bolero", "kani-verifier", "tree-sitter-swift"] }
default = all-languages, demo, polyglot-ast

These default features are set whenever pmat is added without default-features = false somewhere in the dependency tree.

all-languages default = c-ast, cpp-ast, csharp-ast, deep-wasm, go-ast, java-ast, php-ast, python-ast, ruby-ast, ruchy-ast, rust-ast, scala-ast, shell-ast, swift-ast, typescript-ast, wasm-ast
most-languages = c-ast, cpp-ast, csharp-ast, java-ast, python-ast, ruby-ast, rust-ast, scala-ast, typescript-ast
rust-only = rust-ast
polyglot-ast default polyglot-csharp? polyglot-java? polyglot-javascript? polyglot-kotlin? polyglot-ruby? polyglot-scala? polyglot-typescript?

Polyglot AST meta-feature for cross-language analysis

ruchy-ast all-languages = logos, ruchy

Affects ruchy::RuchyAstAnalyzer, ruchy::analyze_ruchy_file_with_parser, ruchy_ml::RuchyMlAstExtractor

go-ast all-languages = tree-sitter, tree-sitter-go

Affects go::GoAstVisitor, go::GoComplexityAnalyzer, go::analyze_go_file

java-ast all-languages most-languages? = polyglot-java, tree-sitter, tree-sitter-java

Affects mcp_integration::java_tools, java::JavaAstVisitor, java::JavaComplexityAnalyzer

csharp-ast all-languages most-languages? = polyglot-csharp, tree-sitter, tree-sitter-c-sharp

Affects csharp::CSharpAstVisitor, csharp::CSharpComplexityAnalyzer

kotlin-ast = polyglot-kotlin, tree-sitter, tree-sitter-kotlin-ng

Affects languages::kotlin_strategy, ast_strategies::KotlinAstStrategy, kotlin::KotlinAstVisitor, kotlin::KotlinComplexityAnalyzer, services::ast_kotlin

ruby-ast all-languages most-languages? = polyglot-ruby, tree-sitter, tree-sitter-ruby
scala-ast all-languages most-languages? = polyglot-scala, tree-sitter, tree-sitter-scala

Affects mcp_integration::scala_tools, scala::ScalaAstVisitor, scala::ScalaComplexityAnalyzer

polyglot-java java-ast? = polyglot-ast

Polyglot language-specific features

polyglot-kotlin kotlin-ast? = polyglot-ast
polyglot-scala scala-ast? = polyglot-ast
polyglot-typescript typescript-ast? = polyglot-ast
polyglot-javascript javascript-ast? = polyglot-ast
polyglot-csharp csharp-ast? = polyglot-ast
polyglot-ruby ruby-ast? = polyglot-ast
wasm-ast all-languages deep-wasm?
deep-wasm all-languages = gimli, wasm-ast

Affects deep_wasm_handlers::DeepWasmOptions, deep_wasm_handlers::handle_deep_wasm, handlers::deep_wasm_handlers, mcp_integration::deep_wasm_tools, services::deep_wasm, services::rust_wasm_analyzer

shell-ast php-ast swift-ast all-languages
skip-slow-tests
rust-ast all-languages most-languages? python-ast? rust-only? typescript-ast? = proc-macro2, quote, tree-sitter, tree-sitter-rust
typescript-ast all-languages javascript-ast? most-languages? = polyglot-typescript, rust-ast, swc_common, swc_ecma_ast, swc_ecma_parser, swc_ecma_visit, tree-sitter, tree-sitter-javascript, tree-sitter-typescript

Affects javascript::JavaScriptStrategy, languages::typescript, languages::javascript, typescript::TypeScriptStrategy, ast_strategies::TypeScriptAstStrategy, ast_strategies::JavaScriptAstStrategy, enhanced_typescript_visitor::EnhancedTypeScriptVisitor, services::ast_typescript, services::ast_typescript_compat

python-ast all-languages most-languages? = rust-ast, tree-sitter, tree-sitter-python

Affects languages::python, python::PythonStrategy, ast_strategies::PythonAstStrategy, enhanced_python_visitor::EnhancedPythonVisitor, services::ast_python, services::ast_python_compat

internal_tests
c-ast all-languages cpp-ast? most-languages? = fixedbitset, tree-sitter, tree-sitter-c

✅ Migration complete! All 5 files migrated from rustpython-parser to tree-sitter-python:
- tdg/analyzer_ast.rs (Phase 4)
- services/mutation/python_adapter.rs (Phase 5a)
- services/ast_python_compat.rs (Phase 5a)
- services/unified_python_analyzer.rs (Phase 5a)
- services/enhanced_python_visitor.rs (Phase 5b)

Affects c::CAstVisitor, c::CComplexityAnalyzer, c::analyze_c_file, languages::c, ast_strategies::CAstStrategy, ast_strategies::CppAstStrategy, services::ast_c, services::ast_c_compat, languages::c_cpp_strategy

cpp-ast all-languages most-languages? = c-ast, cpp_demangle, gimli, goblin, tree-sitter-cpp

Affects cpp::CppAstVisitor, cpp::CppComplexityAnalyzer, cpp::analyze_cpp_file, languages::cpp, services::ast_cpp, services::ast_cpp_compat, languages::c_cpp_strategy

demo default

Feature to exclude demo/reporting functionality for minimal builds

Affects assets::get_asset, server::spawn_sync

javascript-ast = polyglot-javascript, typescript-ast

JavaScript AST support

tui = crossterm, ratatui

TUI mode support

Affects tui::TuiDemoAdapter, tui::TuiRequest, tui::TuiResponse, tui::TuiDemoError, dap::timeline_tui

integration-tests

Integration tests feature

e2e-tests

End-to-end tests feature

perf-tests

Performance tests feature

rocksdb-backend = rocksdb

RocksDB storage backend for high-performance TDG storage

Affects storage_backend::RocksDbBackend

sled-backend = sled

Sled storage backend (deprecated - unmaintained, opt-in only for backward compat)

Affects storage_backend::SledBackend

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

bolero implicit feature

Enables bolero ^0.12

bolero:

fuzz and property testing front-end

kani-verifier implicit feature

Enables kani-verifier ^0.56

Formal verification

sled sled-backend?

Enables sled

DEPRECATED: Unmaintained, kept for backward compat (opt-in only)

quote rust-ast?
proc-macro2 rust-ast?
swc_ecma_parser typescript-ast?

Enables swc_ecma_parser ^24.0

For TypeScript/JavaScript parsing (conditional) - use compatible versions

swc_common typescript-ast?

Enables swc_common ^14.0

swc_ecma_ast typescript-ast?

Enables swc_ecma_ast ^15.0

swc_ecma_visit typescript-ast?

Enables swc_ecma_visit ^15.0

tree-sitter c-ast? csharp-ast? go-ast? java-ast? kotlin-ast? python-ast? ruby-ast? rust-ast? scala-ast? typescript-ast?

Enables tree-sitter ^0.23

For C/C++ parsing (conditional)

tree-sitter-c c-ast?

Enables tree-sitter-c ^0.23

tree-sitter-cpp cpp-ast?
tree-sitter-go go-ast?

Enables tree-sitter-go ^0.23

tree-sitter-java java-ast?
tree-sitter-javascript typescript-ast?

Enables tree-sitter-javascript ^0.23

tree-sitter-typescript typescript-ast?
tree-sitter-python python-ast?

Enables tree-sitter-python ^0.23

tree-sitter-c-sharp csharp-ast?
tree-sitter-kotlin-ng kotlin-ast?
tree-sitter-swift implicit feature

Enables tree-sitter-swift

tree-sitter-swift:

swift grammar for the tree-sitter parsing library

tree-sitter-ruby ruby-ast?
tree-sitter-rust rust-ast?

Enables tree-sitter-rust ^0.23

tree-sitter-scala scala-ast?

Enables tree-sitter-scala ^0.20.0

ruchy ruchy-ast?

Enables ruchy

For Ruchy language support (Ruby alternative parser)

logos ruchy-ast?

Enables logos ^0.14

cpp_demangle cpp-ast?

Enables cpp_demangle ^0.4

Language-specific analysis

gimli cpp-ast? deep-wasm?
goblin cpp-ast?
fixedbitset c-ast?

Enables fixedbitset

Analysis infrastructure for C/C++

ratatui tui?

Enables ratatui

TUI support

crossterm tui?
rocksdb rocksdb-backend?

Enables rocksdb

Storage backends