Skip to content

Commit b7c59ce

Browse files
authored
Merge branch 'main' into server_name
2 parents 3d71cc4 + 8dcc07d commit b7c59ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2160
-2365
lines changed

.config/nextest.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[profile.default]
2+
test-threads = 1
3+
fail-fast = false
4+
slow-timeout = { period = "2s", terminate-after = 2 }
5+
retries = { backoff = "fixed", count = 3, delay = "1s" }

.github/workflows/linting.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: lint
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Install dependencies
18+
run: sudo apt update && sudo apt install jackd2 libjack-jackd2-0 libjack-jackd2-dev
19+
- name: Lint (Default Features)
20+
run: cargo clippy --all-targets -- -D clippy::all
21+
- name: Lint (No features)
22+
run: cargo clippy --all-targets --no-default-features -- -D clippy::all
23+
- name: Cargo Fmt
24+
run: cargo fmt --check

.github/workflows/rust.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/site.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: publish_site
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub
11+
# Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between
18+
# the run in-progress and latest queued. However, do NOT cancel
19+
# in-progress runs as we want to allow these production deployments to
20+
# complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
jobs:
26+
build-site:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
- name: Setup Ruby
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: 3.0
35+
bundler-cache: true
36+
cache-version: 0 # Increment this number to re-download cached gems.
37+
- name: Setup Pages
38+
id: pages
39+
uses: actions/configure-pages@v5
40+
- name: Build with Jekyll
41+
run: |
42+
bundle install
43+
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
44+
working-directory: ./docs
45+
env:
46+
JEKYLL_ENV: production
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: ./docs/_site
51+
deploy-site:
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
needs: build-site
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4

.github/workflows/testing.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: test
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Install dependencies
18+
run: sudo apt update && sudo apt install jackd2 libjack-jackd2-0 libjack-jackd2-dev
19+
# This is required for the tests, but we start it earlier since it may
20+
# take a while to initialize.
21+
- name: Start dummy JACK server
22+
run: jackd -r -ddummy -r44100 -p1024 &
23+
- name: Install Cargo Nextest
24+
uses: taiki-e/install-action@nextest
25+
- name: Build (Default Features)
26+
run: cargo build --verbose
27+
- name: Build (No Features)
28+
run: cargo build --verbose --no-default-features
29+
- name: Build (examples)
30+
run: cargo build --verbose --examples
31+
- name: Run Tests (Default Features)
32+
run: cargo nextest run
33+
- name: Run Doc Tests
34+
run: cargo doc && cargo test --doc

Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ license = "MIT"
88
name = "jack"
99
readme = "README.md"
1010
repository = "https://github.com/RustAudio/rust-jack"
11-
version = "0.11.4"
11+
version = "0.13.0"
1212

1313
[dependencies]
14-
bitflags = "1"
14+
bitflags = "2"
1515
jack-sys = {version = "0.5", path = "./jack-sys"}
1616
lazy_static = "1.4"
1717
libc = "0.2"
18-
log = "0.4"
18+
log = { version = "0.4", optional = true}
1919

2020
[dev-dependencies]
21+
approx = "0.5"
2122
crossbeam-channel = "0.5"
23+
ctor = "0.2"
2224

2325
[features]
24-
default = ["dynamic_loading"]
25-
metadata = []
26+
default = ["dynamic_loading", "log"]
2627
dynamic_loading = ["jack-sys/dynamic_loading"]

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# JACK (for Rust)
2+
3+
Rust bindings for [JACK Audio Connection Kit](<https://jackaudio.org>).
4+
5+
| [![Crates.io](https://img.shields.io/crates/v/jack.svg)](https://crates.io/crates/jack) | [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) |
6+
|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
7+
| [![Docs.rs](https://docs.rs/jack/badge.svg)](https://docs.rs/jack) | [![Test](https://github.com/RustAudio/rust-jack/actions/workflows/testing.yml/badge.svg)](https://github.com/RustAudio/rust-jack/actions/workflows/testing.yml) |
8+
| [📚 Documentation](https://rustaudio.github.io/rust-jack) | [:heart: Sponsor](<https://github.com/sponsors/wmedrano>) |
9+
10+
## Using JACK
11+
12+
13+
The JACK server is usually started by the user or system. Clients can request
14+
that the JACK server is started on demand when they connect, but this can be
15+
disabled by creating a client with the `NO_START_SERVER` option or
16+
`ClientOptions::default()`.
17+
18+
- Linux and BSD users may install JACK1, JACK2 (preferred for low latency), or
19+
Pipewire JACK (preferred for ease of use) from their system package manager.
20+
- Windows users may install JACK from the [official
21+
website](<http://jackaudio.org/downloads/>) or [Chocolatey](<https://community.chocolatey.org/packages/jack>).
22+
- MacOS users may install JACK from the [official
23+
website](<http://jackaudio.org/downloads/>) or [Homebrew](<https://formulae.brew.sh/formula/jack>).
24+
25+
Refer to the [docs.rs documentation](<https://docs.rs/jack/>) for details about
26+
the API. For more general documentation, visit <https://rustaudio.github.io/rust-jack>.
27+
28+
29+
# Testing
30+
31+
Testing requires setting up a dummy server and running the tests using a single
32+
thread. `rust-jack` automatically configures `cargo nextest` to use a single
33+
thread.
34+
35+
```sh
36+
# Set up a dummy server for tests. The script is included in this repository.
37+
./dummy_jack_server.sh &
38+
# Run tests
39+
cargo nextest run
40+
```
41+
42+
Note: If cargo nextest is not available, use `RUST_TEST_THREADS=1 cargo test` to
43+
run in single threaded mode.
44+
45+
46+
## Possible Issues
47+
48+
If the tests are failing, a possible gotcha may be timing issues.
49+
50+
1. If using `cargo test`, try `cargo nextest`. The `cargo nextest`
51+
configuration is set up to run single threaded and to retry flaky tests up
52+
to 3 times.
53+
1. Increase the value used by `sleep_on_test` in `client/common.rs`.
54+
55+
Another case is that libjack may be broken on your setup. Try using libjack2 or
56+
pipewire-jack.

README.org

Lines changed: 0 additions & 62 deletions
This file was deleted.

docs/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_site
2+
.sass-cache
3+
.jekyll-cache
4+
.jekyll-metadata
5+
vendor

docs/404.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
permalink: /404.html
3+
layout: default
4+
---
5+
6+
<style type="text/css" media="screen">
7+
.container {
8+
margin: 10px auto;
9+
max-width: 600px;
10+
text-align: center;
11+
}
12+
h1 {
13+
margin: 30px 0;
14+
font-size: 4em;
15+
line-height: 1;
16+
letter-spacing: -1px;
17+
}
18+
</style>
19+
20+
<div class="container">
21+
<h1>404</h1>
22+
23+
<p><strong>Page not found :(</strong></p>
24+
<p>The requested page could not be found.</p>
25+
</div>

0 commit comments

Comments
 (0)