[package] name = "yara-x-cli" description = """ A command-line interface for YARA-X. """ version.workspace = true authors.workspace = true edition.workspace = true readme.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true rust-version.workspace = true [[bin]] name = "yr" path = "src/main.rs" # Don't run the CLI tests by default when `cargo test` is executed. The # CLI tests require the `target/debug/yr` binary do exists before the # tests are executed, and the CARGO_BIN_EXE_yr environment variable # contains the absolute path to the yr binary. The CLI tests can be run # with: # cargo build # CARGO_BIN_EXE_yr=/path/to/yr cargo test -p yara-x-cli --bin yr test = false [features] # Enable the "debug" command for developers. debug-cmd = [] # When this feature is enabled the CLI program prints debug logs to stderr if # the YRX_LOG environment variable is set to any of the log levels: # # error # warn # info # debug # trace # # You can also specify different log levels for specific targets/modules using # comma-separated `target=level` directives: # # YRX_LOG=info ./yr scan some_rule.yar some_file # YRX_LOG=yara_x=debug ./yr scan some_rule.yar some_file # YRX_LOG=warn,yara_x::compiler=trace ./yr scan some_rule.yar some_file stderr-logs = ["yara-x/stderr-logs"] # Enables rules profiling. Notice that profiling has an impact on scan # performance. rules-profiling = ["yara-x/rules-profiling"] # Include precompiled native code in serialized rules. This reduces rule load # time at the cost of larger, platform-specific compiled-rule files. native-code-serialization = ["yara-x/native-code-serialization"] # Enables the use of wasmtime's Pulley bytecode interpreter instead of the default # Cranelift JIT compiler. See the documentation in the `yara-x` core library for details. pulley = ["yara-x/pulley"] [dependencies] anyhow = { workspace = true } ascii_tree = { workspace = true } clap = { workspace = true, features = ["cargo", "derive"] } clap_complete = { workspace = true } encoding_rs = { workspace = true } figment = { workspace = true, features = ["toml"] } home = { workspace = true } ignore = { workspace = true } itertools = { workspace = true } protobuf = { workspace = true } regex = { workspace = true } serde_json = { workspace = true, features = ["preserve_order"] } serde = { workspace = true, features = ["derive"] } strum = { workspace = true } strum_macros = { workspace = true } walkdir = { workspace = true } yansi = { workspace = true } yara-x = { workspace = true, default-features = true, features = ["parallel-compilation"] } yara-x-parser = { workspace = true } yara-x-proto = { workspace = true } yara-x-fmt = { workspace = true } chardetng = "1.0.0" crossbeam = "0.8.5" crossterm = "0.29.0" dunce = "1.0.5" unicode-width = "0.2.3" wild = "2.2.1" [dev-dependencies] assert_cmd = "2.2.2" assert_fs = "1.1.4" clap_mangen = { workspace = true } predicates = { workspace = true } [target.'cfg(windows)'.dependencies] enable-ansi-support = "0.3.1"