Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

devcontainer configuration update #10

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ WORKDIR /home/

COPY . .

RUN bash ./setup.sh
RUN bash ./script.sh

ENV PATH="/root/.cargo/bin:$PATH"
34 changes: 19 additions & 15 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{
"name": "Codespaces Rust Starter",
"extensions": [
"cschleiden.vscode-github-actions",
"ms-vsliveshare.vsliveshare",
"matklad.rust-analyzer",
"serayuzgur.crates",
"vadimcn.vscode-lldb"
],
"dockerFile": "Dockerfile",
"settings": {
"editor.formatOnSave": true,
"terminal.integrated.shell.linux": "/usr/bin/zsh",
"files.exclude": {
"**/CODE_OF_CONDUCT.md": true,
"**/LICENSE": true
"customizations": {
"vscode": {
"extensions": [
"cschleiden.vscode-github-actions",
"ms-vsliveshare.vsliveshare",
"matklad.rust-analyzer",
"serayuzgur.crates",
"vadimcn.vscode-lldb"
],
"settings": {
"editor.formatOnSave": true,
"terminal.integrated.shell.linux": "/usr/bin/zsh",
"files.exclude": {
"**/CODE_OF_CONDUCT.md": true,
"**/LICENSE": true
}
}
}
}
},
"dockerFile": "Dockerfile"
}
9 changes: 7 additions & 2 deletions .devcontainer/setup.sh → .devcontainer/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ apt-get install -y \

## Install rustup and common components
curl https://sh.rustup.rs -sSf | sh -s -- -y

export PATH="/root/.cargo/bin/":$PATH

rustup install nightly
rustup component add rustfmt
rustup component add rustfmt --toolchain nightly
rustup component add clippy
rustup component add clippy --toolchain nightly

cargo install cargo-expand
cargo install cargo-edit
# Download cargo-binstall to ~/.cargo/bin directory
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

cargo binstall cargo-expand cargo-edit -y

## setup and install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Expand Down