From 481765a378ad5d15a2c135cd653569936773c78f Mon Sep 17 00:00:00 2001 From: deadmeu Date: Wed, 18 Jun 2025 17:52:57 +1000 Subject: [PATCH] Add devcontainer configuration Adds basic devcontainer configuration using Microsoft's rust:1-1-bookworm container. The existing recommended extensions are included. --- .devcontainer/devcontainer.json | 40 +++++++++++++++++++ .devcontainer/postCreateCommand.sh | 4 ++ .../cspell.dictionaries/jargon.wordlist.txt | 2 + 3 files changed, 46 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/postCreateCommand.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..10b86d689f9 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,40 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/rust +{ + "name": "Rust", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/rust:1-1-bookworm", + "customizations": { + "vscode": { + "extensions": [ + // cspell:disable-next-line + "foxundermoon.shell-format", + "streetsidesoftware.code-spell-checker" + ] + } + }, + + // Use 'mounts' to make the cargo cache persistent in a Docker Volume. + // "mounts": [ + // { + // "source": "devcontainer-cargo-cache-${devcontainerId}", + // "target": "/usr/local/cargo", + // "type": "volume" + // } + // ] + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "./.devcontainer/postCreateCommand.sh" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 00000000000..dc7a65fe0d9 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +sudo apt update && sudo apt install -y --no-install-recommends \ + clang diff --git a/.vscode/cspell.dictionaries/jargon.wordlist.txt b/.vscode/cspell.dictionaries/jargon.wordlist.txt index 6358f3c7682..798c6dec9a6 100644 --- a/.vscode/cspell.dictionaries/jargon.wordlist.txt +++ b/.vscode/cspell.dictionaries/jargon.wordlist.txt @@ -28,6 +28,8 @@ denoland deque dequeue dev +devcontainer +devcontainers devs discoverability duplicative