Skip to content
Merged
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
17 changes: 8 additions & 9 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ jobs:
target: wasm32-unknown-unknown
components: clippy, rustfmt

# Install Just to run CI scripts
- uses: extractions/setup-just@v3

# Cargo binstall is used to install tools faster than compiling them from source.
- uses: cargo-bins/cargo-binstall@main
- run: just setup-tools

# Set RUSTFLAGS
- run: echo "RUSTFLAGS=--cfg=web_sys_unstable_apis" >> $GITHUB_ENV

# Cache rust compilation for speed
- uses: Swatinem/rust-cache@v2

# Make sure u guys don't write bad code
- run: cargo check --all
- run: cargo clippy --all --no-deps -- -D warnings
- run: cargo fmt --all --check

# Check for unused dependencies
- uses: bnjbvr/cargo-machete@main
- run: just check
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
# Set RUSTFLAGS
- run: echo "RUSTFLAGS=--cfg=web_sys_unstable_apis" >> $GITHUB_ENV

# Cache rust compilation for speed
- uses: Swatinem/rust-cache@v2

# Run release-plz to create PRs and releases
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
resolver = "2"
members = ["web-codecs", "web-streams", "web-async", "web-message"]
members = ["web-async", "web-codecs", "web-message", "web-streams"]
59 changes: 59 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env just --justfile

# Using Just: https://github.com/casey/just?tab=readme-ov-file#installation

export RUST_BACKTRACE := "1"
export RUST_LOG := "debug"

# List all of the available commands.
default:
just --list

# Install any required dependencies.
setup:
# Install cargo-binstall for faster tool installation.
cargo install cargo-binstall
just setup-tools

# A separate entrypoint for CI.
setup-tools:
cargo binstall -y cargo-shear cargo-sort cargo-upgrades cargo-edit cargo-audit

# Run the CI checks
check:
cargo check --all-targets --all-features
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt -- --check

# requires: cargo install cargo-shear
cargo shear

# requires: cargo install cargo-sort
cargo sort --workspace --check

# requires: cargo install cargo-audit
cargo audit

# Run any CI tests
test:
cargo test

# Automatically fix some issues.
fix:
cargo fix --allow-staged --all-targets --all-features
cargo clippy --fix --allow-staged --all-targets --all-features

# requires: cargo install cargo-shear
cargo shear --fix

# requires: cargo install cargo-sort
cargo sort --workspace

cargo fmt --all

# Upgrade any tooling
upgrade:
rustup upgrade

# Requires: cargo install cargo-upgrades cargo-edit
cargo upgrade
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
components = ["rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]
19 changes: 9 additions & 10 deletions web-codecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ version = "0.3.5"
edition = "2021"

categories = ["wasm", "multimedia", "web-programming", "api-bindings"]
rust-version = "1.85"

[dependencies]
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"

thiserror = "1"
bytes = "1"
derive_more = { version = "2", features = ["from", "display"] }
js-sys = "0.3.77"
thiserror = "2"
tokio = { version = "1", features = ["sync", "macros"] }
bytes = "1"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"

derive_more = { version = "1", features = ["from", "display"] }
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "web_sys_unstable_apis"]
rustc-args = ["--cfg", "web_sys_unstable_apis"]

[dependencies.web-sys]
version = "0.3.77"
Expand Down Expand Up @@ -55,7 +58,3 @@ features = [
"AudioEncoderConfig",
"AudioSampleFormat",
]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "web_sys_unstable_apis"]
rustc-args = ["--cfg", "web_sys_unstable_apis"]
4 changes: 2 additions & 2 deletions web-message/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ RtcDataChannel = ["web-sys/RtcDataChannel"]
MidiAccess = ["web-sys/MidiAccess"]

[dependencies]
web-message-derive = { path = "../web-message-derive", version = "0.0.1", optional = true }
web-sys = "0.3"
thiserror = "2"

url = { version = "2", optional = true }
web-message-derive = { path = "../web-message-derive", version = "0.0.1", optional = true }
web-sys = "0.3"
4 changes: 2 additions & 2 deletions web-streams/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ edition = "2021"
categories = ["wasm", "web-programming", "api-bindings"]

[dependencies]
thiserror = "2.0"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
thiserror = "1.0"

[dependencies.web-sys]
version = "0.3.70"
version = "0.3.77"
features = [
"ReadableStream",
"ReadableStreamDefaultReader",
Expand Down