Skip to content

Enable Invoking Custom Subcommands with Cross #716

Open
@Alexhuszagh

Description

@Alexhuszagh

It's often useful to run custom subcommands for another target, such as asm, deb, or others. Since we can't necessarily enumerate every subcommand, there's a few solutions I see:

  1. Create an environment variable, forcing the command to run in the image, such as CROSS_FORCE_RUN_IN_IMAGE=1. This name isn't ideal, so we'd probably modify it to something else.
  2. If pre-build hooks are a thing and we're fine not supporting custom images, we could write a config file (just a TOML list of known extra subcommands) and parse this if the subcommand isn't known.
  3. Get the output of cross --list if the subcommand isn't known, parse it, and if the subcommand is known, run it in the image.

We need to support the following, at the very least:

  • cargo-valgrind
  • cargo-asm
  • cargo-deb
  • cargo-auditable
  • cargo-bloat

Related to #207, #210, #715.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions