Skip to content
Merged
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
25 changes: 16 additions & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
FROM ubuntu:18.04

WORKDIR /home/

COPY . .

RUN bash ./setup.sh

ENV PATH="/root/.cargo/bin:$PATH"
FROM ubuntu:latest

# Install basic dependencies
RUN apt-get update && \
apt-get install -y \
curl \
wget \
git \
ca-certificates \
gnupg2 \
jq \
sudo \
nano \
vim \
build-essential \
openssl && \
rm -rf /var/lib/apt/lists/*
46 changes: 27 additions & 19 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
{
"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
}
}
}

"name": "bp7-rs Dev Container",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
"remoteUser": "ubuntu",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/rust:1": {
"targets": "wasm32-unknown-unknown,wasm32-wasip1"
}
},
"customizations": {
"vscode": {
"extensions": [
"github.vscode-github-actions",
"rust-lang.rust-analyzer",
"fill-labs.dependi",
"tamasfe.even-better-toml",
"vadimcn.vscode-lldb"
]
}
},
"postCreateCommand": "./.devcontainer/post-create.sh"
}
19 changes: 19 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -euo pipefail

# Install additional Rust toolchain
rustup install nightly

# Install common Rust tools (using cargo-binstall for speed)
curl -L --proto '=https' --tlsv1.2 -sSf \
https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

cargo binstall -y \
cargo-expand \
cargo-edit \
cargo-audit \
cargo-geiger \
cbindgen \
wasm-pack \
wasmtime-cli
34 changes: 0 additions & 34 deletions .devcontainer/setup.sh

This file was deleted.

Loading