Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cargo.toml cleanups #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ default-members = [
"ste",
]

[workspace.package]
version = "0.2.0-alpha.4"
authors = ["John-John Tedro <[email protected]>"]
# Generic associated types were stabilized in 1.65.
rust-version = "1.65"
edition = "2021"
documentation = "https://docs.rs/audio"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
keywords = ["audio", "buffer", "dsp"]
categories = ["multimedia::audio"]

[patch.'https://github.com/udoprog/audio']
audio = { path = "audio" }
audio-core = { path = "audio-core" }
22 changes: 11 additions & 11 deletions audio-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
name = "audio-core"
version = "0.2.0-alpha.4"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
description = "The core audio traits"
documentation = "https://docs.rs/audio"
readme = "README.md"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
keywords = ["audio", "buffer", "dsp"]
categories = ["multimedia::audio"]
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
documentation.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

[features]
default = ["std"]
std = []

[dev-dependencies]
audio = { version = "0.2.0-alpha.4", path = "../audio" }
audio = { path = "../audio" }
20 changes: 10 additions & 10 deletions audio-device-alsa-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "audio-device-alsa-sys"
version = "0.1.0-alpha.1"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
description = "audio-device system bindings for ALSA"
documentation = "https://docs.rs/audio"
readme = "README.md"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
keywords = ["audio", "buffer", "dsp"]
categories = ["multimedia::audio"]
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
documentation.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

[dependencies]
libc = "0.2.125"
Expand Down
20 changes: 10 additions & 10 deletions audio-device-pipewire-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "audio-device-pipewire-sys"
version = "0.1.0-alpha.1"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
description = "audio-device system bindings for PipeWire"
documentation = "https://docs.rs/audio"
readme = "README.md"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
keywords = ["audio", "buffer", "dsp"]
categories = ["multimedia::audio"]
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
documentation.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

[dependencies]
libc = "0.2.125"
Expand Down
20 changes: 10 additions & 10 deletions audio-device-pulse-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "audio-device-pulse-sys"
version = "0.1.0-alpha.1"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
description = "audio-device system bindings for PulseAudio"
documentation = "https://docs.rs/audio"
readme = "README.md"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
keywords = ["audio", "buffer", "dsp"]
categories = ["multimedia::audio"]
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
documentation.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

[dependencies]
libc = "0.2.125"
Expand Down
34 changes: 17 additions & 17 deletions audio-device/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "audio-device"
version = "0.1.0-alpha.6"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
description = "A library for interacting with audio devices"
documentation = "https://docs.rs/audio"
readme = "README.md"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
keywords = ["audio", "buffer", "dsp"]
categories = ["multimedia::audio"]
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
documentation.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

autoexamples = false

Expand Down Expand Up @@ -42,21 +42,21 @@ wasapi = [

[dependencies]
tracing = "0.1.36"
audio-core = { version = "0.2.0-alpha.4", path = "../audio-core" }
audio-core = { path = "../audio-core" }
thiserror = "1.0.31"
rand = "0.8.5"
ste = { version = "0.1.0-alpha.9", path = "../ste" }
ste = { path = "../ste" }

pulse-sys = { package = "audio-device-pulse-sys", version = "0.1.0-alpha.1", path = "../audio-device-pulse-sys", optional = true }
pipewire-sys = { package = "audio-device-pipewire-sys", version = "0.1.0-alpha.1", path = "../audio-device-pipewire-sys", optional = true }
pulse-sys = { package = "audio-device-pulse-sys", path = "../audio-device-pulse-sys", optional = true }
pipewire-sys = { package = "audio-device-pipewire-sys", path = "../audio-device-pipewire-sys", optional = true }

# unix
alsa-sys = { package = "audio-device-alsa-sys", version = "0.1.0-alpha.1", path = "../audio-device-alsa-sys", optional = true }
alsa-sys = { package = "audio-device-alsa-sys", path = "../audio-device-alsa-sys", optional = true }
libc = { version = "0.2.125", optional = true }

[dev-dependencies]
audio = { version = "0.2.0-alpha.4", path = "../audio" }
audio-generator = { version = "0.1.0-alpha.2", path = "../audio-generator" }
audio = { path = "../audio" }
audio-generator = { path = "../audio-generator" }
anyhow = "1.0.57"
tokio = { version = "1.18.1", features = ["full"] }
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
Expand Down
22 changes: 11 additions & 11 deletions audio-generator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "audio-generator"
version = "0.1.0-alpha.2"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
description = "Audio generator APIs"
documentation = "https://docs.rs/audio"
readme = "README.md"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
keywords = ["audio", "buffer", "dsp"]
categories = ["multimedia::audio"]
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
documentation.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

[dependencies]
audio-core = { version = "0.2.0-alpha.4", path = "../audio-core" }
audio-core = { path = "../audio-core" }
22 changes: 11 additions & 11 deletions audio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[package]
name = "audio"
version = "0.2.0-alpha.4"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
description = "A crate for working with audio in Rust"
documentation = "https://docs.rs/audio"
readme = "README.md"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
keywords = ["audio", "buffer", "dsp"]
categories = ["multimedia::audio"]
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
documentation.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

[features]
default = ["std"]
std = ["audio-core/std"]

[dependencies]
audio-core = { version = "0.2.0-alpha.4", path = "../audio-core" }
audio-core = { path = "../audio-core" }

[dev-dependencies]
rand = "0.8.5"
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "examples"
version = "0.0.0"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
edition.workspace = true
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion generate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "generate"
version = "0.0.0"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
edition.workspace = true
publish = false

[dependencies]
Expand Down
13 changes: 7 additions & 6 deletions ste/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "ste"
version = "0.1.0-alpha.11"
authors = ["John-John Tedro <[email protected]>"]
edition = "2018"
description = "A single-threaded executor with some tricks up its sleeve."
documentation = "https://docs.rs/audio"
readme = "README.md"
homepage = "https://github.com/udoprog/audio"
repository = "https://github.com/udoprog/audio"
license = "MIT/Apache-2.0"
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords = ["executor", "thread"]
categories = ["concurrency"]

Expand Down
2 changes: 2 additions & 0 deletions ste/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ impl Thread {
move |tag| {
if let Some(task) = task.take() {
let _ = panic::catch_unwind(panic::AssertUnwindSafe(|| {
let _ = &storage;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let output = with_tag(tag, task);

// Safety: we're the only one with access to this pointer,
Expand Down Expand Up @@ -632,6 +633,7 @@ impl Builder {
let handle = thread::Builder::new()
.name(String::from("ste-thread"))
.spawn(move || {
let _ = &shared2;
let RawSend(shared) = shared2;

#[cfg(feature = "tokio")]
Expand Down
2 changes: 2 additions & 0 deletions ste/src/wait_future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ where
use std::panic;

move |tag| {
let _ = (&waker, &future, &complete);
unsafe {
// Safety: At this point, we know the waker has been
// replaced by the polling task and can safely deref it into
Expand All @@ -82,6 +83,7 @@ where
let future = Pin::new_unchecked(future.0.as_mut());

let result = panic::catch_unwind(panic::AssertUnwindSafe(|| {
let _ = &output;
if let Poll::Ready(ready) = with_tag(tag, || future.poll(&mut cx)) {
*output.0.as_mut() = Some(ready);
}
Expand Down