Rust

This guide will help you get started with a Rust project on Semaphore. If you’re new to Semaphore, we recommend reading our Guided tour first.

Table of contents:

Hello World

# .semaphore/semaphore.yml
version: v1.0
name: Rust example
agent:
  machine:
    type: e1-standard-2
  containers:
    - name: main
      image: semaphoreci/rust:1.35
blocks:
  - name: Hello world
    task:
      jobs:
      - name: Compile and run code
        commands:
          - printf 'fn main() { println!("Hello World!"); }' > hello.rs && rustc hello.rs
          - ./hello

Supported Rust Versions

Semaphore supports all versions of Rust. To run Rust programs you should define a Docker-based agent using one of the available Rust images, or build your own container image that matches your needs.

For more information about pre-built Rust images provided by Semaphore, see semaphoreci/rust documentation on Docker Hub.

Still need help? Contact Us Contact Us