diff --git a/Cargo.lock b/Cargo.lock index b25d58f..3c7cda0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -878,9 +878,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.29.0" +version = "1.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0e2d11620c50695fe12bbbfde96b3477fe606e7284c22d505c12ce51214514" +checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce" dependencies = [ "js-sys", "serde_core", @@ -978,9 +978,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.19.0" +version = "5.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907" +checksum = "1bfeff997a0aaa3eb20c4652baf788d2dfa6d2839a0ead0b3ff69ce2f9c4bdd1" dependencies = [ "async-broadcast", "async-recursion", @@ -1000,7 +1000,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys", - "winnow 1.0.5", + "winnow 0.7.15", "zbus_macros", "zbus_names", "zvariant", @@ -1008,14 +1008,14 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.19.0" +version = "5.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" +checksum = "0bbd5a90dbe8feee5b13def448427ae314ccd26a49cac47905cafefb9ff846f1" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.9", + "syn 2.0.119", "zbus_names", "zvariant", "zvariant_utils", @@ -1023,61 +1023,51 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.3.5" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd" +checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" dependencies = [ "serde", - "winnow 1.0.5", + "winnow 0.7.15", "zvariant", ] -[[package]] -name = "zcheapstr" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "939f186d9ecebe044315a5cb6d6f78568bbc21152adc954d5a0c2f58bdbc9920" -dependencies = [ - "serde", -] - [[package]] name = "zvariant" -version = "5.15.1" +version = "5.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7" +checksum = "68b64ef4f40c7951337ddc7023dd03528a57a3ce3408ee9da5e948bd29b232c4" dependencies = [ "endi", "enumflags2", "serde", - "winnow 1.0.5", - "zcheapstr", + "winnow 0.7.15", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.15.1" +version = "5.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d" +checksum = "484d5d975eb7afb52cc6b929c13d3719a20ad650fea4120e6310de3fc55e415c" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.9", + "syn 2.0.119", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "4.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3" +checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" dependencies = [ "proc-macro2", "quote", "serde", - "syn 3.0.9", - "winnow 1.0.5", + "syn 2.0.119", + "winnow 0.7.15", ] diff --git a/Cargo.toml b/Cargo.toml index 9292dd1..b16f200 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,8 @@ name = "btle-proximity" version = "0.1.0" edition = "2021" +rust-version = "1.85" +resolver = "3" description = "BLE proximity screen locker: locks the desktop session when your phone leaves Bluetooth range" license = "MIT" diff --git a/README.md b/README.md index 56b970c..92bcc3f 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,9 @@ Locking goes through `loginctl lock-session` (works with GNOME, KDE, Sway, ## Requirements - Linux with BlueZ ≥ 5.50 (`bluetoothd` running, adapter powered) +- Rust ≥ 1.85 (`rust-version` is declared in Cargo.toml; the resolver + automatically selects dependency versions compatible with the oldest + supported toolchain) - The phone must be **paired** with the desktop. Pairing gives the daemon a stable identity address (BlueZ resolves the phone's rotating random address against the bonding keys) and is the foundation for authenticated GATT in @@ -59,6 +62,14 @@ cp config.toml.example ~/.config/btle-proximity/config.toml btle-proximity list-paired # pick your phone's MAC, edit config.toml ``` +If you get `command not found`, `~/.cargo/bin` isn't on your PATH (distro +packages of Rust don't set it up): + +```sh +echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc +source ~/.zshrc +``` + Test without locking anything, walk around with the phone and watch: ```sh