Skip to content

Use waybackend for our wayland code #410

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

Open
wants to merge 5 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
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: sudo apt install -y libwayland-dev wayland-protocols
- run: cargo clippy --version
- run: cargo clippy --workspace --locked --tests

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nix-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ jobs:
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- run: nix flake show
- run: nix-env -i nixpkgs#wayland nixpkgs#wayland-protocols
- run: nix flake check --print-build-logs
- run: nix build --print-build-logs
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: mozilla-actions/[email protected]
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@cargo-nextest
- run: sudo apt install -y libwayland-dev wayland-protocols
- run: cargo build --workspace --locked --verbose
- run: cargo nextest run --workspace --locked

Expand All @@ -26,6 +27,7 @@ jobs:
- uses: mozilla-actions/[email protected]
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-nextest
- run: sudo apt install -y libwayland-dev wayland-protocols
- run: cargo build --workspace --locked --verbose
- run: cargo nextest run --workspace --locked

Expand All @@ -43,5 +45,6 @@ jobs:
with:
toolchain: ${{ steps.msrv.outputs.value }}
- uses: taiki-e/install-action@cargo-nextest
- run: sudo apt install -y libwayland-dev wayland-protocols
- run: cargo build --workspace --locked --verbose
- run: cargo nextest run --workspace --locked
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
target/*
completions/*
test_images/*
tests/test_images/*
# Nix
result
109 changes: 66 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[workspace]
# cargo complains that this defaults to one in virtual package manifests (for some reason)
resolver = "2"
members = ["client", "daemon", "common"]
members = ["client", "daemon", "common", "tests"]
default-members = ["client", "daemon"]

[workspace.package]
version = "0.9.5-masterV3"
authors = ["Leonardo Gibrowski Faé <[email protected]>"]
edition = "2021"
license-file = "LICENSE"
rust-version = "1.82"
rust-version = "1.85"

[workspace.dependencies]
common = { path = "common" }
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

## Dependencies

- a compositor that implements:
* wlr-layer-shell (typically wlroots based compositors)
* xdg-output
- a compositor that implements the wlr-layer-shell (typically wlroots based compositors)
- [lz4](https://github.com/lz4/lz4) (for compressing frames when animating)

**Note that this means `swww` will not run on Gnome, because it does not implement the `wlr-layer-shell` protocol**.
Expand All @@ -21,7 +19,8 @@

### Dependencies:

- Up to date stable rustc compiler and cargo (specifically, MSRV is 1.82.0)
- wayland-client and wayland-protocol `.xml` files installed in your system (`pkg-config` must be able to find it)
- Up to date stable rustc compiler and cargo (specifically, MSRV is 1.82.0)

To build, clone this repository and run:
```
Expand Down
7 changes: 2 additions & 5 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ image = { version = "0.25", default-features = false, features = [
"tiff",
"webp",
] }
fast_image_resize = "5.0"
fast_image_resize = "5.1"
clap = { version = "4.5", features = ["derive", "wrap_help", "env"] }
fastrand = { version = "2.1", default-features = false, features = ["std"] }
fastrand = { version = "2.3", default-features = false, features = ["std"] }
common = { workspace = true }

[dev-dependencies]
assert_cmd = "2.0"

[build-dependencies]
clap = { version = "4.5", features = ["derive", "env"] }
clap_complete = "4.5"
4 changes: 2 additions & 2 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license-file.workspace = true
workspace = true

[dependencies]
rustix = { version = "0.38", default-features = false, features = [
rustix = { version = "1.0", default-features = false, features = [
"std",
"net",
"shm",
Expand All @@ -23,7 +23,7 @@ rustix = { version = "0.38", default-features = false, features = [
pkg-config = "0.3"

[dev-dependencies]
fastrand = { version = "2.1", default-features = false, features = ["std"] }
fastrand = { version = "2.3", default-features = false, features = ["std"] }
criterion = { version = "0.5", default-features = false }

[[bench]]
Expand Down
6 changes: 5 additions & 1 deletion common/src/compression/comp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ mod tests {
for x in &mut b[..i] {
*x = 1;
}
assert_eq!(unsafe { count_different(&a, &b, 0) }, (i + 2) / 3, "i: {i}");
assert_eq!(
unsafe { count_different(&a, &b, 0) },
i.div_ceil(3),
"i: {i}"
);
}
}
}
Loading
Loading