The target we’re generating a plugin for. This can be either the native target or a cross
compilation target, so to reduce redundancy when determining the correct bundle paths we’ll use
an enum for this.
Build one or more packages using the provided cargo build arguments. This should be called
before calling bundle(). This requires the current working directory to have been set to
the workspace’s root using chdir_workspace_root().
Bundle a package that was previously built by a call to build() using the provided cargo build arguments. These two functions are split up because building can be done in parallel by
Cargo itself while bundling is sequential. Options from the bundler.toml file in the
workspace’s root are respected (see
https://codeberg.org/BillyDM/nice-plug/src/branch/main/bundler-example.toml). This requires the
current working directory to have been set to the workspace’s root using chdir_workspace_root().
The main xtask entry point function, but with custom command line arguments. args should not
contain the command name, so you should always skip at least one argument from
std::env::args() before passing it to this function.
If compiling for macOS, try to self-sign the bundle at the given path. This shouldn’t be
necessary, but AArch64 macOS is stricter about these things and sometimes self built plugins may
not load otherwise. Presumably in combination with hardened runtimes.