From 377b253aac7d620fbcee551463c3e2b8e25bc8de Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Wed, 27 Jan 2021 05:56:50 +0000 Subject: [PATCH] build: add vscode devcontainer configuration files --- --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/vscode/devcontainers/rust:0-1 + +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \ + apt-get -y install --no-install-recommends libssl-dev pkg-config libclang-dev clang + +USER vscode + +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash && \ + export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && \ + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ + nvm install v12.20.1 && \ + rustup toolchain install nightly-2020-10-01 && \ + rustup default nightly-2020-10-01 && \ + rustup target add wasm32-unknown-unknown \ No newline at end of file --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +{ + "name": "Rust", + "build": { + "dockerfile": "Dockerfile" + }, + "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "lldb.executable": "/usr/bin/lldb", + "files.watcherExclude": { + "**/target/**": true + } + }, + "extensions": [ + "matklad.rust-analyzer" + ], + "remoteUser": "vscode" +} -- gitstuff