Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Version 0.6 Release #86

Merged
merged 185 commits into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
17f2aa1
Revert "Removing the patches for lv2-midi and lv2-state"
JOOpdenhoevel Mar 27, 2020
9d70a21
Revert "Removing the patch for lv2-atom"
JOOpdenhoevel Mar 27, 2020
621c77d
Revert "Removing the patches for lv2-urid and lv2-worker"
JOOpdenhoevel Mar 27, 2020
1b69969
Revert "Removing the patches for time, units, and core"
JOOpdenhoevel Mar 27, 2020
d52d195
Revert "Removing the patch for urid"
JOOpdenhoevel Mar 27, 2020
79bfa2a
Revert "Removing the patches for lv2-sys and the derive crates"
JOOpdenhoevel Mar 27, 2020
93a552a
Merge branch 'master' into develop
JOOpdenhoevel Apr 2, 2020
2368086
Cloning the features cache to allow features to be used in both featu…
JOOpdenhoevel Apr 2, 2020
9abaab0
Restricting access to the feature collections
JOOpdenhoevel Apr 2, 2020
44ca65d
bindgen, use filter to keep only 'LV2' stuff
YruamaLairba Apr 6, 2020
196dcc6
disable bindgen layout test
YruamaLairba Apr 8, 2020
9f655b9
have a feature to choose between bindgen and pregenerated bindings
YruamaLairba Apr 8, 2020
14dc5d8
add lv2-sys-bindgen script that pre generate binding
YruamaLairba Apr 9, 2020
6e6fd62
wip, determine bindings compat from rustc target
YruamaLairba Apr 9, 2020
b048438
use panic hook to silent bindgen panics
YruamaLairba Apr 9, 2020
33d99b4
use split_whitespace instead of split
YruamaLairba Apr 9, 2020
9f8f1c9
save valid targets list in a file
YruamaLairba Apr 9, 2020
d4888a0
break prebuild step if bindings not compatible with target
YruamaLairba Apr 9, 2020
ecdb5c0
add list of usable target with static bindings
YruamaLairba Apr 9, 2020
eb1969c
fix compiling issue when using bindgen, try_main pattern
YruamaLairba Apr 10, 2020
f7e0499
make nicer printing
YruamaLairba Apr 10, 2020
cd99ffd
move generate binding into a lib.rs for future reuse
YruamaLairba Apr 10, 2020
594f00d
function that get the 'layout' type used for a C enum
YruamaLairba Apr 10, 2020
12eaaaa
Small tweaks to the atom crate
JOOpdenhoevel Apr 11, 2020
34585a0
Updating the documentation of Object, increasing the version number
JOOpdenhoevel Apr 11, 2020
ca6458c
Decreasing the version number again
JOOpdenhoevel Apr 11, 2020
4de1315
Adding a note about Blank's deprecation status
JOOpdenhoevel Apr 11, 2020
d398ae0
Merge pull request #65 from Janonard/atom-tweaks
JOOpdenhoevel Apr 11, 2020
4050af9
Formatting
JOOpdenhoevel Apr 11, 2020
982de4b
some refactoring, fix a missing import
YruamaLairba Apr 12, 2020
e3cf980
better printing
YruamaLairba Apr 12, 2020
ef0c8aa
check host enum before doing anything
YruamaLairba Apr 12, 2020
aa617f8
rustformat and quick description for each function
YruamaLairba Apr 12, 2020
8c5801f
Importing the book
JOOpdenhoevel Apr 12, 2020
5ce68f2
some refactoring to limit #[cfg] use
YruamaLairba Apr 12, 2020
8444d17
Adding a nix file for the make process
JOOpdenhoevel Apr 12, 2020
8d7ff2e
Adding a .readthedocs.yml
JOOpdenhoevel Apr 12, 2020
581a50c
Integrating make_chapters into conf
JOOpdenhoevel Apr 12, 2020
6917c8a
Creating a file called contents.rst
JOOpdenhoevel Apr 12, 2020
4fcec73
Merge branch 'develop' of https://github.com/RustAudio/rust-lv2 into …
YruamaLairba Apr 12, 2020
2a76c3f
Creating a workflow for github actions
JOOpdenhoevel Apr 13, 2020
5de051e
Removing the check
JOOpdenhoevel Apr 13, 2020
6e4d173
Restricting to Ubuntu
JOOpdenhoevel Apr 13, 2020
c876427
Adding macOS
JOOpdenhoevel Apr 13, 2020
469bdb2
Creating a build matrix
JOOpdenhoevel Apr 13, 2020
a910afb
Removing Windows
JOOpdenhoevel Apr 13, 2020
847eafc
Adding the toolchain to the matrix
JOOpdenhoevel Apr 13, 2020
b3c30d2
Adding clippy checks
JOOpdenhoevel Apr 13, 2020
9d31485
Removing beta and nightly rust from the check matrix
JOOpdenhoevel Apr 13, 2020
3793f17
Applying a clippy lint
JOOpdenhoevel Apr 13, 2020
831397a
Trying to build the book
JOOpdenhoevel Apr 13, 2020
c0a69df
Trying to fix the installation process
JOOpdenhoevel Apr 13, 2020
9bda074
Cleaning
JOOpdenhoevel Apr 13, 2020
bbf6eff
Restricting book builds to develop pushes only
JOOpdenhoevel Apr 13, 2020
ec4a039
Moving the book into it's own workflow file
JOOpdenhoevel Apr 13, 2020
ae20ec3
Merge pull request #63 from Janonard/double_feature_detection
JOOpdenhoevel Apr 13, 2020
2292ffc
Adding a .nojekyll file to the built book
JOOpdenhoevel Apr 13, 2020
1d7cfe7
Formatting
JOOpdenhoevel Apr 13, 2020
08a6acd
Fixing the path of the .nojekyll file
JOOpdenhoevel Apr 13, 2020
f690a12
Restructuring the introduction
JOOpdenhoevel Apr 13, 2020
b9a89b2
Overhauling the previous examples
JOOpdenhoevel Apr 13, 2020
b5c8987
Completing the metro example
JOOpdenhoevel Apr 13, 2020
df3f0a4
lv2-sys-bindgen README
YruamaLairba Apr 14, 2020
49cb90c
refactor some lv2-sys-bindgen function to make it more reusable
YruamaLairba Apr 14, 2020
604d2b6
reuse "generate_bindings" in build.rs
YruamaLairba Apr 14, 2020
5ec4fc6
add integration test that check equivalence of pre-bindings and
YruamaLairba Apr 14, 2020
bb451d6
allow "cross-compiled" bindings
YruamaLairba Apr 15, 2020
74ce30f
fix, use inferred type instead a broken conditional compilation
YruamaLairba Apr 15, 2020
ae6af1a
update README.md
YruamaLairba Apr 15, 2020
efd8262
Merge branch 'develop' of https://github.com/RustAudio/rust-lv2 into …
YruamaLairba Apr 15, 2020
d976c90
rustfmt and remove unsused import
YruamaLairba Apr 15, 2020
c7d6cd2
fix, broken sys_integration test
YruamaLairba Apr 15, 2020
d27ea1c
rustfmt, just for one trailing space
YruamaLairba Apr 15, 2020
58c40a0
use syn and hashset to check bindings equivalence.
YruamaLairba Apr 16, 2020
c8be48e
format code
YruamaLairba Apr 16, 2020
4c5fe64
use remove trailing comma in ast, improve i32_to_u32 readability
YruamaLairba Apr 17, 2020
fe78dbc
Formatting
JOOpdenhoevel Apr 18, 2020
8afabbc
Merge branch 'sys_build_hack' of github.com:YruamaLairba/rust-lv2 int…
JOOpdenhoevel Apr 18, 2020
89e23cc
Simplifying the generation script
JOOpdenhoevel Apr 18, 2020
0ef0082
Adding bindings for Windows
JOOpdenhoevel Apr 18, 2020
d32ac56
Moving the linux bindings to unix
JOOpdenhoevel Apr 18, 2020
e171bf9
Reordering the bindings to show the differences between windows and unix
JOOpdenhoevel Apr 18, 2020
362e806
Revert "Reordering the bindings to show the differences between windo…
JOOpdenhoevel Apr 18, 2020
7dca561
Adding x86 and x86_64 variants to Unix
JOOpdenhoevel Apr 18, 2020
21cc486
Adding a github actions workflow to generate bindings
JOOpdenhoevel Apr 18, 2020
e1bad8e
Spliting binding tasks
JOOpdenhoevel Apr 18, 2020
dca125e
Rewording targets
JOOpdenhoevel Apr 18, 2020
eade4f1
Removing 32-bit Mac and installing 32-bit libc
JOOpdenhoevel Apr 18, 2020
432ab1e
Adding an apt-get update
JOOpdenhoevel Apr 18, 2020
a2dd8f4
Fixing identation?
JOOpdenhoevel Apr 18, 2020
b5609f6
Removing the upgrade
JOOpdenhoevel Apr 18, 2020
b277ec6
Putting generated bindings in one folder
JOOpdenhoevel Apr 18, 2020
7d29fed
Sorting entries (TODO for windows)
JOOpdenhoevel Apr 18, 2020
06b52df
Adding a patch to lv2
JOOpdenhoevel Apr 27, 2020
610ae4a
Renaming the script to "systool"
JOOpdenhoevel Apr 27, 2020
09f466d
Inserting the updated LV2 specs
JOOpdenhoevel Apr 28, 2020
f934264
Applying new clippy lints
JOOpdenhoevel Apr 28, 2020
e694e84
Merge branch 'develop' into lv2-update
JOOpdenhoevel Apr 28, 2020
ee37498
Adding a note about the version of LV2
JOOpdenhoevel Apr 28, 2020
7361363
Formatting
JOOpdenhoevel Apr 28, 2020
2ca828b
Merge pull request #66 from Janonard/lv2-update
JOOpdenhoevel Apr 28, 2020
7f92fb7
Merge branch 'develop' into pregenerated-sys
JOOpdenhoevel Apr 28, 2020
e93a282
Updating unix bindings
JOOpdenhoevel Apr 28, 2020
a54bc41
Updating Windows
JOOpdenhoevel Apr 28, 2020
918cb18
Updating the pipeline
JOOpdenhoevel Apr 28, 2020
f3f1e46
Removing builds on pregenerated-sys
JOOpdenhoevel Apr 28, 2020
a152f37
Excluding the lv2 headers from the packaged sys crate
JOOpdenhoevel Apr 28, 2020
4ca8707
remove --target arg, allow to pass any clang arg instead
YruamaLairba Apr 29, 2020
9a738f9
typo in my name
YruamaLairba Apr 30, 2020
dd7295c
Merge pull request #1 from YruamaLairba/pregenerated-sys
JOOpdenhoevel May 6, 2020
794ac49
Improving conditional compilation
JOOpdenhoevel May 6, 2020
72c4b6a
Adapting the new arguments to the Actions pipeline
JOOpdenhoevel May 6, 2020
d92fcbf
Dropping macOS support, making Windows experimental
JOOpdenhoevel May 6, 2020
5ee9711
Removing macOS from the build matrix
JOOpdenhoevel May 6, 2020
290bd79
Merge pull request #68 from Janonard/pregenerated-sys
JOOpdenhoevel May 6, 2020
6ddaa6e
Propagating the experimental targets to lv2
JOOpdenhoevel May 6, 2020
cc043d7
Adding windows to the build matrix
JOOpdenhoevel May 6, 2020
9dbf15d
Formatting
JOOpdenhoevel May 6, 2020
2dfff4e
Merge pull request #69 from Janonard/sys-fixes
JOOpdenhoevel May 6, 2020
013ef5c
Changing the examples to cdylibs
JOOpdenhoevel May 6, 2020
4558b9b
Fixing a bug in the metronome
JOOpdenhoevel May 6, 2020
3cc379a
Merge pull request #70 from Janonard/example-fix
JOOpdenhoevel May 6, 2020
2a360c6
Creating a note about supported targets
JOOpdenhoevel May 10, 2020
3f5bd64
Removing the path for iterpipes
JOOpdenhoevel May 14, 2020
e995c34
Removing all unnecessary notes about clang
JOOpdenhoevel May 16, 2020
8b04192
Fixing some doc errors
JOOpdenhoevel May 16, 2020
5fd9db0
Extending the installation script for targets
JOOpdenhoevel May 16, 2020
a202062
Merge branch 'develop' into sys-doc
JOOpdenhoevel May 16, 2020
76e93bd
Updating the dependency to iterpipes
JOOpdenhoevel May 16, 2020
8393c9d
Merge pull request #71 from Janonard/pipes-update
JOOpdenhoevel May 16, 2020
e1e5e4f
Merge branch 'develop' into sys-doc
JOOpdenhoevel May 16, 2020
db7f19a
Verifying 32-bit Linux
JOOpdenhoevel May 16, 2020
613dbde
Fixing wrong Japanese localization of "gain"
JOOpdenhoevel Jul 9, 2020
0c055fe
Merge branch 'develop' into sys-doc
JOOpdenhoevel Jul 10, 2020
5110462
Merge pull request #72 from Janonard/sys-doc
JOOpdenhoevel Jul 12, 2020
c667132
Initial implementation of the MakePath and FreePath features
JOOpdenhoevel Jul 12, 2020
9cc776c
add experimental bindings for arm and aarch64
YruamaLairba Jul 18, 2020
c44a97e
add systool alias
YruamaLairba Jul 18, 2020
5ccf68d
update systool doc
YruamaLairba Jul 18, 2020
4381e5a
add cross-platform bindings generation instruction
YruamaLairba Jul 18, 2020
d0ce60f
Replace regex usage by function from std
YruamaLairba Jul 18, 2020
d4a9531
Iterating over the path features
JOOpdenhoevel Jul 19, 2020
85d4fab
Polishing the API
JOOpdenhoevel Jul 19, 2020
d84fe35
only check for null terminator
YruamaLairba Jul 23, 2020
5a405fd
update README.md about bindings and targets
YruamaLairba Jul 23, 2020
0ff8ebf
Merge pull request #78 from YruamaLairba/no_regex
JOOpdenhoevel Jul 24, 2020
1778f0d
Merge branch 'develop' into missing-state-features
JOOpdenhoevel Jul 24, 2020
3f76e76
Fixing the installation script
JOOpdenhoevel Jul 26, 2020
d4d0ce7
Merge pull request #79 from Janonard/fix-install-script
JOOpdenhoevel Jul 26, 2020
abb8a0f
Merge branch 'develop' into missing-state-features
JOOpdenhoevel Jul 26, 2020
0594182
Stripping down the path handling
JOOpdenhoevel Jul 26, 2020
79f5b69
Documenting
JOOpdenhoevel Jul 26, 2020
307c27a
Re-Abstracting path mapping
JOOpdenhoevel Jul 31, 2020
a05f0b6
Testing the path features
JOOpdenhoevel Jul 31, 2020
5dbd0dd
Trying to fix the test for windows
JOOpdenhoevel Jul 31, 2020
f95aa54
update README.md
YruamaLairba Aug 13, 2020
73c198d
Introducing target Tiers
JOOpdenhoevel Sep 16, 2020
f3fac00
Removing the experimental feature
JOOpdenhoevel Sep 16, 2020
3299393
Merge pull request #80 from Janonard/tiers
JOOpdenhoevel Sep 16, 2020
5da66ce
A bit of polish on the path features
JOOpdenhoevel Sep 17, 2020
ec64d3c
Making MapPath non-optional
JOOpdenhoevel Sep 17, 2020
6d50b51
Fix #81: Add missing `proc_macro` declaration.
ln42 Sep 22, 2020
4027a6b
Merge pull request #83 from ln42/fix/81
JOOpdenhoevel Oct 7, 2020
7dfea6e
More Documentation
JOOpdenhoevel Oct 7, 2020
5755957
Merge branch 'develop' into missing-state-features
JOOpdenhoevel Oct 7, 2020
47259c7
Adding the binding files to the target listings
JOOpdenhoevel Oct 7, 2020
0f66c79
Merge pull request #84 from Janonard/develop
JOOpdenhoevel Oct 7, 2020
110bcac
Merge branch 'develop' into missing-state-features
JOOpdenhoevel Oct 7, 2020
782175c
Making URIDs generic for all functions
JOOpdenhoevel Oct 7, 2020
71142cc
Merge branch 'develop' into missing-state-features
JOOpdenhoevel Oct 7, 2020
49c7f4f
Merge pull request #85 from Janonard/develop
JOOpdenhoevel Oct 7, 2020
b479c61
Completing the path example
JOOpdenhoevel Oct 7, 2020
f287491
Merging the StateErr and the PathErr
JOOpdenhoevel Oct 7, 2020
98f3446
Merge branch 'develop' into cross_bindings
YruamaLairba Oct 9, 2020
152fe5c
separate aarch64 and arm binding, fix a crap
YruamaLairba Oct 9, 2020
e55f3f6
add some aarch64 and arm target to tier2
YruamaLairba Oct 9, 2020
4a20f99
arm.rs was broken, replaced by a new version
YruamaLairba Oct 9, 2020
5d18c09
Merge pull request #77 from YruamaLairba/cross_bindings
JOOpdenhoevel Oct 10, 2020
30573a0
Merge branch 'develop' into missing-state-features
JOOpdenhoevel Oct 10, 2020
c318b90
Finish documenatation of the missing state features
JOOpdenhoevel Oct 10, 2020
5a52c23
Merge pull request #76 from Janonard/missing-state-features
JOOpdenhoevel Oct 10, 2020
7f5867c
Add sample_count to Plugin run method
niclashoyer Oct 15, 2020
14bc29e
Merge pull request #88 from niclashoyer/sample_count
JOOpdenhoevel Oct 23, 2020
e1d863e
Documenting the new run parameter
JOOpdenhoevel Oct 23, 2020
3ec16a2
Bumping version numbers
JOOpdenhoevel Oct 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
systool = "run -p systool --"
34 changes: 34 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Book

on:
push:
branches:
- master
- develop

jobs:
book:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1.2.0
with:
python-version: 3.8
- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build Book
run: |
cd docs
make html
touch _build/html/.nojekyll
- name: Deploy
if: success()
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: docs/_build/html
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72 changes: 72 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Rust

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
toolchain: [stable, beta, nightly]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: Build
run: cargo build --all --all-features --verbose
- name: Run tests
run: cargo test --all --all-features --verbose

check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Format
run: cargo fmt --all -- --check
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features -- -D warnings

linux-bindings:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: i686-unknown-linux-gnu
- name: Install 32-bit libc
run: |
sudo apt-get update
sudo apt-get install libc6-dev-i386
- name: Generate
run: |
mkdir bindings
cargo run -p systool -- -I ./sys/lv2/ -o bindings/x86_64.rs -- -target x86_64-unknown-linux-gnu
cargo run -p systool -- -I ./sys/lv2/ -o bindings/x86.rs -- -target i686-unknown-linux-gnu
- uses: actions/upload-artifact@v1
with:
name: linux-bindings
path: bindings
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Contributing to rust-lv2
# Contributing to Rust-LV2

*Inspired by [Rust's contribution guide](https://github.com/rust-lang/rust/blob/d9051341a1c142542a3f7dab509266606c775382/CONTRIBUTING.md).*

Thank you for your interest in contributing to rust-lv2! There are many ways to contribute, and we appreciate all of them.
Thank you for your interest in contributing to Rust-LV2! There are many ways to contribute, and we appreciate all of them.

## General or Usage questions, Feature Ideas or Discussions

Our main discussion panel is the [Rust Audio Discourse](https://rust-audio.discourse.group/). Most of our design decisions are taken there and it's the perfect place to post any question or idea. rust-lv2 isn't the only project there, so you may post anything that is somehow related to Rust and Audio Processing.
Our main discussion panel is the [Rust Audio Discourse](https://rust-audio.discourse.group/). Most of our design decisions are taken there and it's the perfect place to post any question or idea. Rust-LV2 isn't the only project there, so you may post anything that is somehow related to Rust and Audio Processing.

## Bug Reports

Expand Down Expand Up @@ -39,15 +39,15 @@ Instead, this happened: <explanation>
### Backtrace:
```

All three components are important: what you did, what you expected, what happened instead. Please include the dependencies to rust-lv2 in your `Cargo.toml` so we can track down where to find the bug.
All three components are important: what you did, what you expected, what happened instead. Please include the dependencies to Rust-LV2 in your `Cargo.toml` so we can track down where to find the bug.

Sometimes, a backtrace is helpful, and so including that is nice. To get a backtrace, set the `RUST_BACKTRACE` environment variable to a value other than `0`. The easiest way to do this is to invoke `cargo` like this:

$ RUST_BACKTRACE=1 cargo build

## Pull Requests

Pull requests are the primary mechanism we use to change rust-lv2. GitHub itself has some [great documentation](https://help.github.com/articles/about-pull-requests/) on using the Pull Request feature. We use the "fork and pull" model [described here](https://help.github.com/articles/about-collaborative-development-models/), where contributors push changes to their personal fork and create pull requests to bring those changes into the source repository.
Pull requests are the primary mechanism we use to change Rust-LV2. GitHub itself has some [great documentation](https://help.github.com/articles/about-pull-requests/) on using the Pull Request feature. We use the "fork and pull" model [described here](https://help.github.com/articles/about-collaborative-development-models/), where contributors push changes to their personal fork and create pull requests to bring those changes into the source repository.

Please make pull requests against the `develop` branch.

Expand All @@ -59,6 +59,6 @@ Another useful feature are [draft Pull Requests](https://github.blog/2019-02-14-

## Writing Documentation

Documentation improvements are very welcome. The API documentation is generated from the source code itself. However, the [rust-lv2 book](https://github.com/Janonard/rust-lv2-book), which explains how to use rust-lv2 in general, is a separate project. Documentation pull requests function in the same way as other pull requests.
Documentation improvements are very welcome. The API documentation is generated from the source code itself. Documentation pull requests function in the same way as other pull requests.

To find documentation-related issues, sort by the [documentation](https://github.com/RustAudio/rust-lv2/labels/documentation) label.
46 changes: 37 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lv2"
version = "0.5.1"
version = "0.6.0"
authors = ["Jan-Oliver 'Janonard' Opdenhövel <jan.opdenhoevel@protonmail.com>", "Adrien Prokopowicz <adrien.prokopowicz@gmail.com>",
"Yruama_Lairba <yruama_lairba@hotmail.com>"]
edition = "2018"
Expand All @@ -16,39 +16,43 @@ travis-ci = { repository = "RustAudio/rust-lv2", branch = "master" }
maintenance = { status = "actively-developed" }

[dependencies.lv2-atom]
version = "1.0.0"
version = "2.0.0"
optional = true

[dependencies.lv2-core]
version = "2.0.0"
version = "3.0.0"
optional = true

[dependencies.lv2-midi]
version = "1.0.0"
version = "1.2.0"
optional = true

[dependencies.lv2-time]
version = "0.1.0"
version = "0.1.3"
optional = true

[dependencies.lv2-units]
version = "0.1.0"
version = "0.1.3"
optional = true

[dependencies.urid]
version = "0.1.0"
optional = true

[dependencies.lv2-urid]
version = "2.0.0"
version = "2.1.0"
optional = true

[dependencies.lv2-state]
version = "1.0.0"
version = "2.0.0"
optional = true

[dependencies.lv2-sys]
version = "2.0.0"
optional = true

[dependencies.lv2-worker]
version = "0.1.0"
version = "0.1.1"
optional = true

[features]
Expand All @@ -74,6 +78,7 @@ full = [
"urid",
"lv2-urid",
"lv2-state",
"lv2-sys",
"lv2-worker",
]
wmidi = ["lv2-midi", "lv2-midi/wmidi"]
Expand All @@ -86,10 +91,33 @@ members = [
"midi",
"state",
"sys",
"sys/tool",
"time",
"units",
"urid",
"urid/derive",
"urid/lv2-urid",
"worker",
"docs/amp",
"docs/fifths",
"docs/metro",
"docs/midigate",
]

[profile.release]
lto = true

[patch.crates-io]
lv2 = { path = "." }
lv2-atom = { path = "atom" }
lv2-core = { path = "core" }
lv2-core-derive = { path = "core/derive" }
lv2-midi = { path = "midi" }
lv2-state = { path = "state" }
lv2-sys = { path = "sys" }
lv2-time = { path = "time" }
lv2-units = { path = "units" }
urid = { path = "urid" }
urid-derive = { path = "urid/derive" }
lv2-urid = { path = "urid/lv2-urid" }
lv2-worker = { path = "worker" }
64 changes: 38 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# rust-lv2
# Rust-LV2

[![Build Status][travis-badge]][travis-url] [![Current Crates.io Version][crates-badge]][crates-url]

Expand Down Expand Up @@ -92,12 +92,26 @@ impl Plugin for Amp {
lv2_descriptors!(Amp);
```

## Using this framework
## About this framework

### Q&A

#### Does my host program support it?

Plugins created with `rust-lv2` are compatible to all LV2 hosts that comply to the specifications. If your application uses [`lilv`](https://drobilla.net/software/lilv), it's a good sign that it will support your plugin. Some prime examples are [Carla](https://kx.studio/Applications:Carla) and [Ardour](https://ardour.org/).

#### Can I host plugins with `rust-lv2`?

Currently, hosting plugins is not supported. This project was initialy started to create plugins using safe Rust and therefore, it is very plugin-centric. There are plans for integrated plugin hosting or a spin-off project, but those won't start in the near future.

However, there is a lot of code that can be re-used for a hosting framework. If you want to create such a framework, you should take a look at `lv2-sys`, `urid`, and `lv2-atom`.

A bare hosting framework would require an RDF triple store which can load Turtle files, an internal store for plugin interfaces and their extensions, a centralized URID map store, and a graph based work scheduling system to execute `run` functions in order.

### Documentation

There are multiple valuable sources of documentation:
* ["The rust-lv2 book"](https://janonard.github.io/rust-lv2-book/) describes how to use rust-lv2 in general, broad terms. It's the ideal point to get started and is updated with every new version of rust-lv2.
* ["The Rust-LV2 book"](https://rustaudio.github.io/rust-lv2/) describes how to use Rust-LV2 in general, broad terms. It's the ideal point to get started and is updated with every new version of Rust-LV2.
* [The API documentation](https://docs.rs/lv2).
* [The LV2 specification reference](https://lv2plug.in/ns/).

Expand All @@ -122,37 +136,35 @@ There are also feature sets that account for common scenarios:
* `plugin`: Usual crates for standard plugins. Includes `lv2-core`, `lv2-atom`, `lv2-midi`, `lv2-urid`, and `urid`. **This is the default.**
* `full`: All sub-crates.

### Building
## Supported targets

Since the bindings to the raw C headers are generated with bindgen, you need to have [Clang](https://clang.llvm.org/) installed on your system and, if it isn't in your system's standard path, set the environment variable `LIBCLANG_PATH` to the path of `libClang`.
Rust-LV2 uses pregenerated C API bindings for different targets in order to increase usability and building speed. Rust has a lot of [supported targets](https://forge.rust-lang.org/release/platform-support.html), but our maintaining power is limited and therefore, only certain targets can be supported. We've ranked different targets in Tiers, [just like rustc does](https://doc.rust-lang.org/nightly/rustc/platform-support.html), which gives you a general understanding of what to expect of a target. The tables below list the supported targets, the used binding in the [`lv2-sys`](sys/) crate, and, if applicable, the maintainer and the last verification of that target.

## Q&A
The bindings itself are generated with the [LV2 systool](sys/tool/) and verified by building the [example plugins of the book](docs) and testing them with a host of that target.

### Does my host program support it?
### Tier 1

Plugins created with `rust-lv2` are compatible to all LV2 hosts that comply to the specifications. If your application uses [`lilv`](https://drobilla.net/software/lilv), it's a good sign that it will support your plugin. Some prime examples are [Carla](https://kx.studio/Applications:Carla) and [Ardour](https://ardour.org/).

### What targets are supported?

We currently support stable and beta Rust running on macOS and Linux. Windows will probably work too, but the Windows build environment of Travis CI is currently broken and we therefore can not support it.

We would like to also support Windows as well as ARM-based embedded devices like Raspberry Pis. If you can help us with these targets, please do so!

### Can I host plugins with `rust-lv2`?

Currently, hosting plugins is not supported. This project was initialy started to create plugins using safe Rust and therefore, it is very plugin-centric. There are plans for integrated plugin hosting or a spin-off project, but those won't start in the near future.

However, there is a lot of code that can be re-used for a hosting framework. If you want to create such a framework, you should take a look at `lv2-sys`, `urid`, and `lv2-atom`.

A bare hosting framework would require an RDF triple store which can load Turtle files, an internal store for plugin interfaces and their extensions, a centralized URID map store, and a graph based work scheduling system to execute `run` functions in order.
A Tier 1 target for `rust-lv2` also has to be a Tier 1 target of rustc. You can check the [platform support page](https://doc.rust-lang.org/nightly/rustc/platform-support.html) to see which targets are included and what they provide. Additionally, there has to be a [maintainer](https://github.com/orgs/RustAudio/teams/lv2-maintainers) of `rust-lv2` who has access to a machine that runs this target and who can generate and verify bindings on this machine. This means that if you have a problem running your code on a Tier 1 target, there will be a maintainer who can help you.

### Why `bindgen`?
| Target | Binding | Maintainer | Last Verification |
|----------------------------|-------------------|------------|----------------------------------------------------------------------------------------------------------|
| `x86_64-unknown-linux-gnu` | `linux/x86_64.rs` | @Janonard | 10. of May 2020, using [Carla](https://github.com/falkTX/Carla) v2.1, running on Arch Linux |
| `x86-unknown-linux-gnu` | `linux/x86.rs` | @Janonard | 16th of May 2020, using [Carla](https://github.com/falkTX/Carla) v2.1, running on Linux Mint 19.3 32-bit |

`lv2-sys` uses `bindgen` to generate the Rust representation of the LV2 C API. Rust can not handle verbatim C code, but is able to define type and function definitions that exactly match those from the C headers. However, since serveral importants details in C aren't properly defined, these bindings need to be different for every platform. One example: While Rust's `u32` is always an unsigned, 32-bit wide integer, C's `int` may be 16 to 64 bits wide and may be signed or unsigned; It depends on the platform.
### Tier 2

One solution would be to generate bindings for every supported target, but if we would only support stable, beta and nightly Rust on [tier 1 platforms](https://forge.rust-lang.org/release/platform-support.html#tier-1), we would still have to maintain 21 different versions of the same crate. If we would add [tier 2 platforms](https://forge.rust-lang.org/release/platform-support.html#tier-2) too (which would include e.g. the Raspberry Pis), there would be 216(!) different versions.
A Tier 2 target is a target that is at least in Tier 2 of rustc and has a generated binding. However, it might not work (well) and there might not be a maintainer who has access to a machine that runs this target and who can generate and verify bindings on this machine. This means that if you have a problem running your code on a Tier 2 target, you're stepping into uncharted territory.

I guess it's obvious that this isn't a maintainable situation. Therefore, the bindings need to be generated every time they are build, which requires the build dependency to `bindgen`.
| Target | Binding |
|---------------------------------------|--------------|
| `aarch64-unknown-linux-gnu` | `aarch64.rs` |
| `arm-unknown-linux-gnueabi` | `arm.rs` |
| `arm-unknown-linux-gnueabihf` | `arm.rs` |
| `armv5te-unknown-linux-gnueabi` | `arm.rs` |
| `armv7-unknown-linux-gnueabi` | `arm.rs` |
| `armv7-unknown-linux-gnueabihf` | `arm.rs` |
| `thumbv7neon-unknown-linux-gnueabihf` | `arm.rs` |
| `x86_64-pc-windows-msvc` | `windows.rs` |

## License

Expand Down
Loading