Skip to content

Commit d75d558

Browse files
committed
move the client example to its own crate
We're likely to add more examples with more dependencies (e.g. ffmpeg, gstreamer, webrtc). Nice to not have their deps in the main crate's dev-dependencies, and likewise to have each example show its true dependencies. As mentioned here: #19 (comment)
1 parent 33bd057 commit d75d558

File tree

8 files changed

+47
-14
lines changed

8 files changed

+47
-14
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,29 @@ jobs:
3535
toolchain: ${{ matrix.rust }}
3636
override: true
3737
components: ${{ matrix.extra_components }}
38+
- name: Build
39+
run: cargo build --all-features --all-targets --workspace
3840
- name: Test
39-
run: cargo test --all-features --all-targets
41+
run: cargo test --all-features --all-targets --workspace
4042
- name: Check fuzz tests
41-
run: cd fuzz && cargo check
43+
run: cd fuzz && cargo check --workspace
4244
- name: Check main crate formatting
4345
if: matrix.rust == 'stable'
4446
run: cargo fmt -- --check
4547
- name: Check fuzz crate formatting
4648
if: matrix.rust == 'stable'
47-
run: cd fuzz && cargo fmt -- --check
49+
run: cd fuzz && cargo fmt -- --check --all
4850
- name: Clippy on main crate
4951
if: matrix.rust == 'stable'
50-
run: cargo clippy -- -D warnings
52+
run: cargo clippy --workspace -- -D warnings
5153
- name: Clippy on fuzz crate
5254
if: matrix.rust == 'stable'
53-
run: cd fuzz && cargo clippy -- -D warnings
55+
run: cd fuzz && cargo clippy --workspace -- -D warnings
5456

5557
license:
5658
name: Check copyright/license headers
5759
runs-on: ubuntu-20.04
5860
steps:
5961
- name: Checkout
6062
uses: actions/checkout@v2
61-
- run: find . -type f -print0 | xargs -0 .github/workflows/check-license.py
63+
- run: find . -type f -print0 | xargs -0 .github/workflows/check-license.py

Cargo.lock

Lines changed: 16 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[workspace]
2+
members = [".", "examples/client"]
3+
default-members = ["."]
4+
15
[package]
26
name = "retina"
37
version = "0.4.0"
@@ -34,12 +38,9 @@ tokio-util = { version = "0.7.3", features = ["codec"] }
3438
url = "2.2.1"
3539

3640
[dev-dependencies]
37-
anyhow = "1.0.41"
3841
criterion = { version = "0.3.4", features = ["async_tokio"] }
39-
itertools = "0.10.1"
4042
mylog = { git = "https://github.com/scottlamb/mylog" }
41-
structopt = "0.3.21"
42-
tokio = { version = "1.5.0", features = ["fs", "io-util", "macros", "parking_lot", "rt-multi-thread", "signal", "test-util"] }
43+
tokio = { version = "1.5.0", features = ["io-util", "macros", "rt-multi-thread", "test-util"] }
4344

4445
[profile.bench]
4546
debug = true

examples/client/Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
name = "client"
3+
version = "0.0.0"
4+
publish = false
5+
edition = "2021"
6+
rust-version = "1.59"
7+
8+
[dependencies]
9+
bytes = "1.0.1"
10+
futures = "0.3.14"
11+
log = "0.4.8"
12+
retina = { path = "../../" }
13+
tokio = { version = "1.5.0", features = ["fs", "io-util", "macros", "rt-multi-thread", "signal"] }
14+
url = "2.2.1"
15+
anyhow = "1.0.41"
16+
itertools = "0.10.1"
17+
mylog = { git = "https://github.com/scottlamb/mylog" }
18+
structopt = "0.3.21"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)