Provide a cargo subcommand for NIH-plug's bundler

This commit is contained in:
Robbert van der Helm
2022-03-02 10:27:02 +01:00
parent bfe93f8d90
commit fa7f9fd85b
6 changed files with 39 additions and 0 deletions

10
cargo_nih_plug/Cargo.toml Normal file
View File

@@ -0,0 +1,10 @@
[package]
name = "cargo-nih-plug"
version = "0.1.0"
edition = "2021"
authors = ["Robbert van der Helm <mail@robbertvanderhelm.nl>"]
description = "A cargo subcommand for compiling and bundling plugins, analogous to NIH-plug's `cargo xtask`"
license = "ISC"
[dependencies]
nih_plug_xtask = { path = "../nih_plug_xtask" }

13
cargo_nih_plug/README.md Normal file
View File

@@ -0,0 +1,13 @@
# NIH-plug: cargo subcommand for bundling plugins
This is NIH-plug's `cargo xtask` command, as a `cargo` subcommand. This way you
can use it outside of NIH-plug projects. If you're using NIH-plug, you'll want
to use the xtask integration directly instead, see:
<https://github.com/robbert-vdh/nih-plug/tree/master/nih_plug_xtask>.
Since this has not yet been published to `crates.io`, you'll need to install
this using:
```shell
cargo install --git https://github.com/robbert-vdh/nih-plug.git cargo-nih-plug
```

View File

@@ -0,0 +1,6 @@
fn main() -> nih_plug_xtask::Result<()> {
// This includes both the `cargo` command and the `nih-plug` subcommand, so we should get rid of
// those first
let args = std::env::args().skip(2);
nih_plug_xtask::main_with_args(args)
}