build(rust): declare rust-version 1.88; rustup setup for the server
This commit is contained in:
1 parent
4e619aa2ae
commit
63353f1e80
4 files changed
+19
-5
No files matched your search
+13
-4
@@ -72,12 +72,21 @@ Linux needs `pkg-config` and `libssl-dev`.
|
||||
|
||||
### Deploy
|
||||
|
||||
On the server, after `git pull` (the Python side of the switch ships in the
|
||||
same commit):
|
||||
Needs Rust >= 1.88. Distro `cargo` packages are older (`resolver 3 is not
|
||||
valid` / `edition 2024` errors), so install the toolchain once with rustup:
|
||||
|
||||
```bash
|
||||
cargo build --release --locked --manifest-path rust/Cargo.toml # as a normal user,
|
||||
# or BIN=<CI artifact>
|
||||
apt-get install -y build-essential pkg-config libssl-dev curl
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
. "$HOME/.cargo/env" # puts ~/.cargo/bin before /usr/bin/cargo
|
||||
cargo --version # >= 1.88
|
||||
```
|
||||
|
||||
Then on the server, after `git pull` (the Python side of the switch ships in
|
||||
the same commit):
|
||||
|
||||
```bash
|
||||
cargo build --release --locked --manifest-path rust/Cargo.toml # or BIN=<CI artifact>
|
||||
sudo bash scripts/install_collector.sh # install + dry run, nothing switched
|
||||
sudo bash scripts/install_collector.sh --cutover # Rust collects from now on
|
||||
sudo bash scripts/install_collector.sh --rollback # back to Python collection
|
||||
|
||||
Reference in new issue
Block a user