rust_deployer.bat
is a batch script designed to automate the deployment of Rust applications to cloud servers. It ensures Rust is installed, builds the application from source, and creates a systemd service file to run a custom command specified per project.
- Checks and installs Rust on the server if not already available.
- Uploads the Rust project's
src
folder andCargo.toml
to the server. - Builds the Rust project on the server.
- Dynamically generates a systemd service file to run a specified command.
- Automates the setup and deployment process for Rust applications.
Run the script with the necessary flags:
rust_deployer.bat -pn "<project_name>" -sa "<server_address>" -sk "<ssh_key_path>" -su "<ssh_username>" -cmd "<command>"