diff options
| -rw-r--r-- | .devcontainer/devcontainer.json | 17 | ||||
| -rwxr-xr-x | .devcontainer/setup.sh | 7 | ||||
| -rw-r--r-- | README.md | 2 |
3 files changed, 26 insertions, 0 deletions
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..0fd90cc --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,17 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "waitFor": "onCreateCommand", + "onCreateCommand": ".devcontainer/setup.sh", + "updateContentCommand": "cargo build", + "postCreateCommand": "", + "postAttachCommand": { + "server": "rustlings watch" + }, + "customizations": { + "vscode": { + "extensions": [ + "rust-lang.rust-analyzer" + ] + } + } +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 0000000..0e090a8 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,7 @@ +#!/bin/bash +curl https://sh.rustup.rs -sSf | sh -s -- -y + +# Update current shell environment variables after install to find rustup +. "$HOME/.cargo/env" +rustup install stable +bash install.sh @@ -66,6 +66,8 @@ If you get a permission denied message, you might have to exclude the directory [](https://gitpod.io/#https://github.com/rust-lang/rustlings) +Open up Rustlings in [Codespaces](https://docs.github.com/en/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository) + ## Manually Basically: Clone the repository at the latest tag, run `cargo install --path .`. |
