Rust: allow to specify more cargo configuration options

This allows to tweak via extractor options some aspects of the cargo
configuration:
* the target architecture
* features (including `*` for all, which we must understand whether to
  set by default)
* cfg overrides

Integration tests will be added in a follow-up commit.
This commit is contained in:
Paolo Tranquilli
2024-11-08 12:21:25 +01:00
parent 083394073a
commit be45e3deed
7 changed files with 155 additions and 33 deletions

View File

@@ -35,3 +35,22 @@ options:
reduce execution time of consecutive extractor runs. By default, a new scratch
directory is used for each run.
type: string
cargo_target:
title: Target architecture
description: >
Target architecture to use for analysis, analogous to `cargo --target`. By
default the host architecture is used.
type: string
cargo_features:
title: Cargo features to turn on
description: >
Comma-separated list of features to turn on. If any value is `*` all features
are turned on. By default only default cargo features are enabled. Can be
repeated.
type: array
cargo_cfg_overrides:
title: Cargo cfg overrides
description: >
Comma-separated list of cfg settings to enable, or disable if prefixed with `-`.
Can be repeated.
type: array