Skip to content

Commit d5b647d

Browse files
authored
Merge pull request #1399 from eroullit/codespaces
Codespaces ❤️ Rustlings
2 parents 701b4be + 86f8fa8 commit d5b647d

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
3+
"waitFor": "onCreateCommand",
4+
"onCreateCommand": ".devcontainer/setup.sh",
5+
"updateContentCommand": "cargo build",
6+
"postCreateCommand": "",
7+
"postAttachCommand": {
8+
"server": "rustlings watch"
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"rust-lang.rust-analyzer"
14+
]
15+
}
16+
}
17+
}

.devcontainer/setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
curl https://sh.rustup.rs -sSf | sh -s -- -y
3+
4+
# Update current shell environment variables after install to find rustup
5+
. "$HOME/.cargo/env"
6+
rustup install stable
7+
bash install.sh

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ If you get a permission denied message, you might have to exclude the directory
6666

6767
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/rust-lang/rustlings)
6868

69+
[![Open Rustlings On Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/?repo=rust-lang%2Frustlings&ref=main)
70+
6971
## Manually
7072

7173
Basically: Clone the repository at the latest tag, run `cargo install --path .`.

0 commit comments

Comments
 (0)