[package] name = "diffsitter" description = "An AST based difftool for meaningful diffs" readme = "README.md" version = "0.8.4" authors = ["Afnan Enayet "] edition = "2021" license = "MIT" keywords = ["diff", "ast", "difftool"] categories = ["command-line-utilities"] build = "build.rs" homepage = "https://github.com/afnanenayet/diffsitter" repository = "https://github.com/afnanenayet/diffsitter" include = [ "src/**/*", "LICENSE", "README.md", "grammars/**/*.c", "grammars/**/*.cc", "grammars/**/*.cpp", "grammars/**/*.h", "grammars/**/*.hpp", "build.rs", "!**/*.png", "!**/test/**/*", "!**/*_test.*", "!**/examples/**/*", "!**/target/**/*", "!assets/*", ] default-run = "diffsitter" [[bin]] name = "diffsitter" path = "src/bin/diffsitter.rs" [[bin]] name = "diffsitter_completions" path = "src/bin/diffsitter_completions.rs" [[bin]] name = "diffsitter-utils" path = "src/bin/diffsitter_utils.rs" [lib] name = "libdiffsitter" path = "src/lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] tree-sitter = "0.22.6" clap = { version = "4.5.15", features = [ "derive", "env", "unicode", "wrap_help", ] } clap_complete = "4.5.16" anyhow = { version = "1.0.86", features = ["backtrace"] } phf = { version = "0.11.2", features = ["macros"] } console = "0.15.8" strum = { version = "0.26.3", features = ["derive"] } strum_macros = "0.26.4" serde = { version = "1.0.207", features = ["derive"] } serde_json = "1.0.124" json5 = "0.4.1" pretty_env_logger = "0.5.0" log = { version = "0.4.22", features = ["std"] } thiserror = "1.0.63" logging_timer = "1.1.1" jemallocator = { version = "0.5.4", optional = true } libloading = "0.8.5" unicode-segmentation = "1.11.0" human-panic = "2.0.1" shadow-rs = { version = "0.29.0", optional = true } enum_dispatch = "0.3.13" lazy_static = { version = "1.5.0", optional = true } [dev-dependencies] test-case = "3.3.1" pretty_assertions = "1.4.0" mockall = "0.12.1" # We need the backtrace feature to enable snapshot name generation in # single-threaded tests (tests using cargo cross run single-threaded due to # limitations with QEMU). insta = { version = "1.39.0" } [target.'cfg(target_os = "windows")'.dependencies] # We use directories next to get the windows config path directories-next = "2.0.0" [target.'cfg(not(target_os = "windows"))'.dependencies] # We use XDG for everything else xdg = "2.5.2" [build-dependencies] cc = { version = "1.1.11", features = ["parallel"] } phf = { version = "0.11.2", features = ["macros"] } anyhow = "1.0.86" cargo-emit = "0.2.1" rayon = "1.10.0" thiserror = "1.0.63" shadow-rs = { version = "0.29.0", optional = true } [features] default = ["static-grammar-libs"] # Enable full build info as a subcommand. This takes longer to build so it's # generally just enabled for releases. better-build-info = ["shadow-rs"] # Enable dynamically loading libraries instead of compiling the libraries as # submodules. dynamic-grammar-libs = [] # Compile the static tree-sitter grammars from the submodules in this repo. static-grammar-libs = ["lazy_static"] [profile.profiling] inherits = "release" # Debug symbols are required for profiling strip = false # Want to keep debug info debug = true [profile.production] inherits = "release" lto = true codegen-units = 1 # Makes the binary a little smaller strip = true