Skip to content

Commit 95804b9

Browse files
authored
Merge pull request #17 from Guara92/sccache_feature
Sccache feature
2 parents 9b5c76c + 93660fb commit 95804b9

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Note that all these images depend on having the rust feature set up (`ghcr.io/de
2525
| Cargo Nexttest | ghcr.io/lee-orr/rusty-dev-containers/cargo-nextest:0 | Installs [Cargo Nextest](https://nexte.st/) - a powerful test runner for rust |
2626
| 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 |
2727
| 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 |
28+
| 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) |
2829
| | **Terminal Tools** | |
2930
| 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 |
3031
| 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. |

src/sccache/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# sccache (sccache)
2+
3+
A feature to install sccache
4+
5+
6+
7+
## Example Usage
8+
9+
```json
10+
"features": {
11+
"ghcr.io/lee-orr/rusty-dev-containers/sccache:0": {}
12+
}
13+
```
14+
15+
## Options
16+
17+
| Options Id | Description | Type | Default Value |
18+
| ---------- | ----------- | ---- | ------------- |
19+
20+
---
21+
22+
_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`._

src/sccache/devcontainer-feature.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "sccache",
3+
"id": "sccache",
4+
"version": "0.0.8",
5+
"description": "A feature to install sccache",
6+
"options": {
7+
},
8+
"installsAfter": [
9+
"ghcr.io/devcontainers/features/rust",
10+
"cargo_binstall"
11+
]
12+
}

src/sccache/install.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -e
3+
4+
if ! which rustup > /dev/null; then
5+
which curl > /dev/null || (apt update && apt install curl -y -qq)
6+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7+
source $HOME/.cargo/env
8+
fi
9+
10+
dpkg -l | grep build-essential || (apt update && apt install build-essential -y -qq)
11+
12+
if ! cargo install --list | grep "cargo-binstall" > /dev/null; then
13+
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
14+
fi
15+
16+
cargo binstall scache --locked -y

0 commit comments

Comments
 (0)