install.sh: offer to install Rust with rustup when cargo is missing

Instead of stopping with "Rust is required", the script now looks for an
existing rustup environment, then offers to install the toolchain with
rustup (minimal profile). It asks first, unless --yes is given, and
refuses to install silently without a terminal. It checks for a C linker
and curl/wget beforehand and downloads the rustup script to a file before
running it. --uninstall does not need Rust. Document it in both READMEs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 09:17:44 +01:00
parent 105b4be66e
commit 593d76242a
4 changed files with 70 additions and 5 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ cargo test --lib engine::tests::shake # one test (name filter)
cargo clippy --all-targets && cargo fmt # both must stay clean (rustfmt.toml: max_width 140)
cargo run --release -- demo out/ # render every effect to PNG, no display needed
cargo run -- -vv --no-tray # run the daemon verbosely (-vv = debug for the sourizz crate only)
./install.sh [--uninstall] # user install into ~/.local
./install.sh [--uninstall] [--yes] # user install into ~/.local; offers to install Rust via rustup if cargo is missing
```
`examples/x11_probe.rs` is an end-to-end check against a running X11 daemon (also `fake_keys`, `mover` helpers). Run the daemon with an isolated config: `XDG_CONFIG_HOME=<tmp> sourizz --no-tray`. The probe only touches its own test window, but a human moving the real mouse during the run makes it fail.