Rust
This guide provides tips and hints for building Rust projects.
Overview
Rust is not preinstalled on Linux Semaphore environments. You must use Docker Environments to build and test Rust projects.
How to compile Rust code
You may use one of the pre-built Rust images to run the jobs in a Docker-based environment.
-
Open the workflow editor
-
Select the pipeline
-
Select Docker Containers in the Environment Type
-
Select one of the available machines
-
Type the name of a Rust image, e.g.
semaphoreci/rust:1.75
-
Configure your jobs, for example
checkout
rustc main.rs
./main -
Press Run the workflow
See artifacts to learn how to save and persist the built binary.
Find Dockerfiles to build your custom Rust images in the semaphoreci/docker-images repository.