AIMP SDK for Rust
In Cargo.toml
:
[lib]
crate-type = ["cdylib"] # to compile into DLL
[dependencies]
aimp = { git = "https://github.com/ark0f/aimp.rs" }
Then you need to install cargo-aimp
utility:
cargo install --git https://github.com/ark0f/aimp.rs --bin cargo-aimp
And simply run it:
cargo aimp
It will build and install plugin, run AIMP with attached console
For more information about cargo-aimp run it with --help
flag
See examples and
To test inside AIMP:
use aimp::AimpString;
#[cfg(feature = "testing")]
use aimp::test::TesterPlugin;
#[aimp::test]
fn some_test() {
let s = AimpString::from("123");
assert_eq!(s.to_string(), "123");
}
#[cfg(not(feature = "testing"))]
aimp::main!(YourPlugin);
#[cfg(feature = "testing")]
aimp::main!(TesterPlugin);
Cargo.toml
:
[features]
testing = []
And then:
cargo aimp --features testing
aimp.rs under either of:
at your option.