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
@@ -41,7 +41,7 @@ Differences and gaps:
## Install
You need a recent stable [Rust toolchain](https://rustup.rs) (developed with 1.98; the crate uses edition 2024). **No `-dev` packages are required**: the build is pure Rust and loads `libxkbcommon` at run time. The first build takes a few minutes because the settings window pulls in egui; `cargo build --release --no-default-features` builds the daemon alone.
You need a recent stable [Rust toolchain](https://rustup.rs) (developed with 1.98; the crate uses edition 2024). **No `-dev` packages are required**: the build is pure Rust and loads `libxkbcommon` at run time. The first build takes a few minutes because the settings window pulls in egui; `cargo build --release --no-default-features` builds the daemon alone. If Rust is missing, `./install.sh` offers to install it with rustup (it needs `curl` or `wget` and a C linker such as `build-essential`; add `--yes` to skip the question).
```sh
git clone <this repository> sourizz && cd sourizz