Skip to content

Latest commit

 

History

History
71 lines (55 loc) · 1.22 KB

README.md

File metadata and controls

71 lines (55 loc) · 1.22 KB

aimp.rs

AIMP SDK for Rust

How to use

Cargo

In Cargo.toml:

[lib]
crate-type = ["cdylib"] # to compile into DLL

[dependencies]
aimp = { git = "https://github.com/ark0f/aimp.rs" }

cargo-aimp

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

Plugin structure

See examples and

Tests

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

License

aimp.rs under either of:

at your option.