Skip to content

Commit

Permalink
rename repository to vst3-rs and crate to vst3
Browse files Browse the repository at this point in the history
  • Loading branch information
glowcoil committed Aug 7, 2023
1 parent 697c879 commit b22046e
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: cargo doc
- name: Add index.html
run: |
echo '<meta charset="utf-8"><meta http-equiv="refresh" content="0; url=vst3_bindgen">' > target/doc/index.html
echo '<meta charset="utf-8"><meta http-equiv="refresh" content="0; url=vst3">' > target/doc/index.html
- name: Publish documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
21 changes: 1 addition & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
[package]
name = "vst3-bindgen"
version = "0.1.1"
authors = ["Micah Johnston <[email protected]>"]
edition = "2021"
description = "Binding generator for the VST 3 API"
documentation = "https://coupler.rs/vst3-bindgen/"
repository = "https://github.com/coupler-rs/vst3-bindgen"
license = "MIT OR Apache-2.0"

[dependencies]
com-scrape-types = { path = "com-scrape-types", version = "0.1.0" }

[build-dependencies]
com-scrape = { path = "com-scrape", version = "0.1.1" }

[[example]]
name = "gain"
crate-type = ["cdylib"]

[workspace]
members = [
"com-scrape",
"com-scrape-types",
"vst3",
]
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# vst3-bindgen
# vst3-rs

[![Cargo](https://img.shields.io/crates/v/vst3-bindgen.svg)](https://crates.io/crates/vst3-bindgen)
[![Docs](https://github.com/coupler-rs/vst3-bindgen/actions/workflows/docs.yml/badge.svg?branch=master)](https://coupler.rs/vst3-bindgen/)
[![Cargo](https://img.shields.io/crates/v/vst3.svg)](https://crates.io/crates/vst3)
[![Docs](https://github.com/coupler-rs/vst3-rs/actions/workflows/docs.yml/badge.svg?branch=master)](https://coupler.rs/vst3-rs/)

`vst3-bindgen` provides Rust bindings for the VST 3 API, generated from the original C++ headers. Abstractions are provided for manipulating COM objects and implementing COM interfaces from Rust. Beyond that, however, these bindings are unsafe, and no attempt is made to abstract over the VST 3 API itself.
The `vst3` crate provides Rust bindings for the VST 3 API, generated from the original C++ headers. Abstractions are provided for manipulating COM objects and implementing COM interfaces from Rust. Beyond that, however, these bindings are unsafe, and no attempt is made to abstract over the VST 3 API itself.

For licensing reasons, `vst3-bindgen` does not contain a copy of the VST 3 SDK itself. Instead, users of this crate must separately obtain a copy of the SDK and specify its path via the `VST3_SDK_DIR` environment variable.
For licensing reasons, the `vst3` crate does not contain a copy of the VST 3 SDK itself. Instead, users of this crate must separately obtain a copy of the SDK and specify its path via the `VST3_SDK_DIR` environment variable.

## Usage

First, add `vst3-bindgen` as a dependency to your `Cargo.toml`:
First, add `vst3` as a dependency to your `Cargo.toml`:

```toml
[dependencies]
vst3-bindgen = "0.1.0"
vst3 = "0.1.0"
```

Then, download the VST 3 SDK:
Expand All @@ -33,8 +33,8 @@ It can be convenient to include the VST 3 interface headers in your project repo
VST3_SDK_DIR = { value = "vst3sdk", relative = true }
```

This crate also depends on `libclang` for parsing the C++ header files in the SDK. For information on how to install `libclang` for various platforms, see the [`bindgen` user guide](https://rust-lang.github.io/rust-bindgen/requirements.html#clang); for information on controlling how `vst3-bindgen` searches for `libclang`, see the [`clang-sys` documentation](https://github.com/KyleMayes/clang-sys#readme). `libclang` version 6.0 or later is required.
This crate also depends on `libclang` for parsing the C++ header files in the SDK. For information on how to install `libclang` for various platforms, see the [`bindgen` user guide](https://rust-lang.github.io/rust-bindgen/requirements.html#clang); for information on controlling how the `vst3` crate searches for `libclang`, see the [`clang-sys` documentation](https://github.com/KyleMayes/clang-sys#readme). `libclang` version 6.0 or later is required.

## License

`vst3-bindgen` is distributed under the terms of both the [MIT license](LICENSE-MIT) and the [Apache license, version 2.0](LICENSE-APACHE). Contributions are accepted under the same terms.
This project is distributed under the terms of both the [MIT license](LICENSE-MIT) and the [Apache license, version 2.0](LICENSE-APACHE). Contributions are accepted under the same terms.
2 changes: 1 addition & 1 deletion com-scrape-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version = "0.1.0"
authors = ["Micah Johnston <[email protected]>"]
edition = "2021"
description = "Support code for bindings generated with com-scrape"
repository = "https://github.com/coupler-rs/vst3-bindgen"
repository = "https://github.com/coupler-rs/vst3-rs"
license = "MIT OR Apache-2.0"
2 changes: 1 addition & 1 deletion com-scrape/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.1"
authors = ["Micah Johnston <[email protected]>"]
edition = "2021"
description = "Automatically generates Rust bindings for COM interfaces"
repository = "https://github.com/coupler-rs/vst3-bindgen"
repository = "https://github.com/coupler-rs/vst3-rs"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion com-scrape/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Cargo](https://img.shields.io/crates/v/com-scrape.svg)](https://crates.io/crates/com-scrape)
[![Docs](https://docs.rs/com-scrape/badge.svg)](https://docs.rs/com-scrape)

`com-scrape` is a tool for automatically generating Rust bindings for COM interfaces defined in C++. `com-scrape` is developed specifically for use in the `vst3-bindgen` crate, and as such, robustness for arbitrary C++ inputs is a non-goal.
`com-scrape` is a tool for automatically generating Rust bindings for COM interfaces defined in C++. `com-scrape` is developed specifically for use in the `vst3` crate, and as such, robustness for arbitrary C++ inputs is a non-goal.

## License

Expand Down
2 changes: 1 addition & 1 deletion com-scrape/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! `com-scrape` is a tool for automatically generating Rust bindings for COM interfaces defined in
//! C++. `com-scrape` is developed specifically for use in the `vst3-bindgen` crate, and as such,
//! C++. `com-scrape` is developed specifically for use in the `vst3` crate, and as such,
//! robustness for arbitrary C++ inputs is a non-goal.

mod clang;
Expand Down
19 changes: 19 additions & 0 deletions vst3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "vst3"
version = "0.1.1"
authors = ["Micah Johnston <[email protected]>"]
edition = "2021"
description = "Binding generator for the VST 3 API"
documentation = "https://coupler.rs/vst3-rs/vst3/"
repository = "https://github.com/coupler-rs/vst3-rs"
license = "MIT OR Apache-2.0"

[dependencies]
com-scrape-types = { path = "../com-scrape-types", version = "0.1.0" }

[build-dependencies]
com-scrape = { path = "../com-scrape", version = "0.1.1" }

[[example]]
name = "gain"
crate-type = ["cdylib"]
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/gain.rs → vst3/examples/gain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::str::FromStr;
use std::sync::atomic::{AtomicU64, Ordering};
use std::{ptr, slice};

use vst3_bindgen::{uid, Class, ComRef, ComWrapper, Steinberg::Vst::*, Steinberg::*};
use vst3::{uid, Class, ComRef, ComWrapper, Steinberg::Vst::*, Steinberg::*};

fn copy_cstring(src: &str, dst: &mut [c_char]) {
let c_string = CString::new(src).unwrap_or_else(|_| CString::default());
Expand Down Expand Up @@ -49,7 +49,7 @@ unsafe fn len_wstring(string: *const TChar) -> usize {
len as usize
}

const PLUGIN_NAME: &'static str = "Gain (vst3-bindgen example plugin)";
const PLUGIN_NAME: &'static str = "Gain (vst3-rs example plugin)";

struct GainProcessor {
gain: AtomicU64,
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs → vst3/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `vst3-bindgen` provides Rust bindings for the VST 3 API, generated from the original C++
//! The `vst3` crate provides Rust bindings for the VST 3 API, generated from the original C++
//! headers. Abstractions are provided for manipulating COM objects and implementing COM interfaces
//! from Rust. Beyond that, however, these bindings are unsafe, and no attempt is made to abstract
//! over the VST 3 API itself.
Expand Down Expand Up @@ -29,11 +29,11 @@
//! # Implementing COM interfaces from Rust
//!
//! COM classes can be defined in Rust using the [`Class`] trait and the interface traits generated
//! by `vst3-bindgen`, and objects of these classes can be instantiated using the
//! from the VST 3 headers, and objects of these classes can be instantiated using the
//! [`ComWrapper`] smart pointer:
//!
//! ```
//! # use vst3_bindgen::{*, Steinberg::*};
//! # use vst3::{*, Steinberg::*};
//! struct MyClass;
//!
//! impl Class for MyClass {
Expand Down

0 comments on commit b22046e

Please sign in to comment.