From 3565facdfd7a70e017da9f7af53b23eb46a6e85f Mon Sep 17 00:00:00 2001 From: cowuake Date: Sun, 24 Mar 2024 12:03:25 +0100 Subject: [PATCH] Draft devcontainer configuration --- .devcontainer/Dockerfile | 3 +++ .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++++++ .devcontainer/setup.sh | 14 ++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/setup.sh diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..1e20f8b --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,3 @@ +FROM fedora:latest +COPY . . +RUN dnf update && chmod +x ./setup.sh && ./setup.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3ebefac --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +{ + "name": "Codespaces Rust DevEnv", + "dockerFile": "Dockerfile", + "customizations": { + "vscode": { + "extensions": [ + "jdinhlife.gruvbox", + "rust-lang.rust-analyzer", + "vscode-icons-team.vscode-icons" + ], + "settings": { + "diffEditor.ignoreTrimWhitespace": true, + "editor.cursorBlinking": "phase", + "editor.cursorStyle": "block", + "editor.fontFamily": "'Source Code Pro', 'Cascadia Code'", + "editor.fontLigatures": true, + "editor.formatOnSave": true, + "editor.trimAutoWhitespace": true, + "terminal.integrated.shell.linux": "/usr/bin/bash", + "vsicons.dontShowNewVersionMessage": true, + "workbench.colorTheme": "Gruvbox Dark Soft", + "workbench.iconTheme": "vscode-icons" + } + } + } +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100644 index 0000000..5470512 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Install Rustup +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + +# Install wasm-pack +cargo install wasm-pack + +# Add Rust WASM target +rustup target add wasm32-unknown-unknown + +# Install and add Clyppy +cargo install clippy +rustup component add clippy