Skip to content

Commit

Permalink
Merge pull request #17 from Guara92/sccache_feature
Browse files Browse the repository at this point in the history
Sccache feature
  • Loading branch information
lee-orr committed Aug 29, 2023
2 parents 9b5c76c + 93660fb commit 95804b9
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Note that all these images depend on having the rust feature set up (`ghcr.io/de
| Cargo Nexttest | ghcr.io/lee-orr/rusty-dev-containers/cargo-nextest:0 | Installs [Cargo Nextest](https://nexte.st/) - a powerful test runner for rust |
| Honggfuzz | ghcr.io/lee-orr/rusty-dev-containers/honggfuzz:0 | Installs [Honggfuzz](https://github.com/rust-fuzz/honggfuzz-rs/blob/master/README.md) - a security oriented fuzzer |
| Cargo Web | ghcr.io/lee-orr/rusty-dev-containers/cargo-web:0 | Installs [Cargo Web](https://github.com/koute/cargo-web) - a toolset for client side web |
| sccache | ghcr.io/lee-orr/rusty-dev-containers/sccache:0 | Installs [sccache](https://github.com/mozilla/sccache) - a tool to speed up recompilation by caching previous compilations, you will need to set up a rustc wrapper in your cargo config, see [usage](https://github.com/mozilla/sccache#usage) |
| | **Terminal Tools** | |
| Bacon | ghcr.io/lee-orr/rusty-dev-containers/bacon:0 | Intalls [Bacon](https://github.com/Canop/bacon) - a terminal based rust code checker that can watch & run check, flippy, fmt, and tests in the background |
| Mprocs | ghcr.io/lee-orr/rusty-dev-containers/mprocs:0 | Installs [mprocs](https://github.com/pvolok/mprocs) - a command line tool for running multiple commands in parallel. |
Expand Down
22 changes: 22 additions & 0 deletions src/sccache/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# sccache (sccache)

A feature to install sccache



## Example Usage

```json
"features": {
"ghcr.io/lee-orr/rusty-dev-containers/sccache:0": {}
}
```

## Options

| Options Id | Description | Type | Default Value |
| ---------- | ----------- | ---- | ------------- |

---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/lee-orr/rusty-dev-containers/blob/main/src/sccache/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
12 changes: 12 additions & 0 deletions src/sccache/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "sccache",
"id": "sccache",
"version": "0.0.8",
"description": "A feature to install sccache",
"options": {
},
"installsAfter": [
"ghcr.io/devcontainers/features/rust",
"cargo_binstall"
]
}
16 changes: 16 additions & 0 deletions src/sccache/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -e

if ! which rustup > /dev/null; then
which curl > /dev/null || (apt update && apt install curl -y -qq)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
fi

dpkg -l | grep build-essential || (apt update && apt install build-essential -y -qq)

if ! cargo install --list | grep "cargo-binstall" > /dev/null; then
curl -L --proto '=https' --tlsv1.2 -sSf https://github.com/raw/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
fi

cargo binstall scache --locked -y

0 comments on commit 95804b9

Please sign in to comment.