Skip to content

Instantly share code, notes, and snippets.

@dacci
Created September 26, 2021 05:55
Show Gist options
  • Select an option

  • Save dacci/499a486646f084ff53132e1b393eab8d to your computer and use it in GitHub Desktop.

Select an option

Save dacci/499a486646f084ff53132e1b393eab8d to your computer and use it in GitHub Desktop.
CodeBuild buildspec for Rust projects.
version: "0.2"
env:
shell: bash
phases:
install:
commands:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- source $HOME/.cargo/env
build:
commands:
- cargo build --release
artifacts:
files:
- target/release/YOUR_BINARY
discard-paths: "yes"
cache:
paths:
- $HOME/.cargo/registry/**/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment