1
0
Fork 0

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

7
Cargo.lock generated
View file

@ -89,6 +89,13 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
[[package]]
name = "cargo-nih-plug"
version = "0.1.0"
dependencies = [
"nih_plug_xtask",
]
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.73" version = "1.0.73"

View file

@ -14,6 +14,8 @@ members = [
"nih_plug_derive", "nih_plug_derive",
"nih_plug_egui", "nih_plug_egui",
"nih_plug_xtask", "nih_plug_xtask",
"cargo_nih_plug",
"xtask", "xtask",
"plugins/examples/gain", "plugins/examples/gain",

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)
}

View file

@ -3,6 +3,7 @@ name = "xtask"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
authors = ["Robbert van der Helm <mail@robbertvanderhelm.nl>"] authors = ["Robbert van der Helm <mail@robbertvanderhelm.nl>"]
description = "A helper for compiling and bundling plugins, can be invoked in this repo using `cargo xtask`"
license = "ISC" license = "ISC"
[dependencies] [dependencies]