steps:
  - bash: |
      set -ex
      curl https://sh.rustup.rs -sSf | sh -s -- -y
      rustup toolchain install $RUSTUP_TOOLCHAIN
      rustup default $RUSTUP_TOOLCHAIN
      echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
    env:
      RUSTUP_TOOLCHAIN: ${{parameters.rust_version}}
    displayName: Install Rust

  # All platforms.
  - bash: |
      set -ex
      rustc -Vv
      cargo -V
    displayName: Query rust and cargo versions
