Skip to content

buildless/sample-sccache-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust + redis sample

Buildless, Rust, Redis and Sccache.

Details about this sample

Together, these tools provide a Rust development environment, enabled with blazing-fast remote build caching. Buildless handles build caching for the app.

Additional resources

Trying the sample

Before you start: Obtain an API key for Buildless, set it at BUILDLESS_APIKEY in your environment Install Sccache Create an environment variable RUSTC_WRAPPER and set it to sccache Create an environment variable SCCACHE_REDIS and set it to rediss://apikey:{YOUR_KEY}@redis.less.build:6379

  1. Clone the sample
  2. Run a build with cargo build; observe that Rust uses Buildless

That's it! Enjoy lightning-fast builds on Rust 🔥

Building and running the app

To build the Rust app:

cargo build --all

To run the Rust app:

cargo run

Using the sample for your own codebase

This is a GitHub Template repository; you can easily use it to create your own repo. Follow these steps to customize it for use with your Buildless account:

  1. Update .github/CODEOWNERS
  2. Add a GitHub Secret called BUILDLESS_APIKEY, set to the API key you want to use in CI
  3. That's it!

Sharing an API key across an organization

You can use Organization Secrets to automatically provide a BUILDLESS_APIKEY to all your repos.