diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e1b2cec..f25e8bd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,17 +1,8 @@ { - "image": "mcr.microsoft.com/devcontainers/universal:2-linux", - "waitFor": "onCreateCommand", - "onCreateCommand": ".devcontainer/setup.sh", - "updateContentCommand": "cargo build", - "postCreateCommand": "", - "postAttachCommand": { - "server": "rustlings watch" - }, - "customizations": { - "vscode": { - "extensions": [ - "rust-lang.rust-analyzer" - ] - } + "image": "mcr.microsoft.com/devcontainers/rust:1", + "updateContentCommand": ["cargo", "build"], + "postAttachCommand": ["rustlings", "watch"], + "remoteEnv": { + "PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/target/debug" } } diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh deleted file mode 100755 index 0e090a8..0000000 --- a/.devcontainer/setup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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