diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json index de51286..4aeab08 100644 --- a/.devcontainer/devcontainer-lock.json +++ b/.devcontainer/devcontainer-lock.json @@ -1,5 +1,10 @@ { "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "version": "2.7.1", + "resolved": "ghcr.io/devcontainers/features/common-utils@sha256:e76a6a8a35d1ad824daad1540725e0ec9f8ed2dc00d2850e990a9830013c7d08", + "integrity": "sha256:e76a6a8a35d1ad824daad1540725e0ec9f8ed2dc00d2850e990a9830013c7d08" + }, "ghcr.io/devcontainers/features/github-cli:1": { "version": "1.1.3", "resolved": "ghcr.io/devcontainers/features/github-cli@sha256:bd7ab48a832228f633239277552c30b353867fef2e5b037e064b4e64f0b843f2", diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a38b004..0a6dc6b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,33 +1,31 @@ // 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": "config", - "build": { - "dockerfile": "Dockerfile" - }, - + "name": "componentized-config", + "image": "mcr.microsoft.com/devcontainers/rust", + "runArgs": [ + "--name=componentized-config" + ], // Use 'mounts' to make the cargo cache persistent in a Docker Volume. "mounts": [ { - "source": "devcontainer-cargo-cache-${devcontainerId}", + "source": "devcontainer-cargo-cache", "target": "/usr/local/cargo", "type": "volume" }, { - "source": "devcontainer-rustup-cache-${devcontainerId}", + "source": "devcontainer-rustup-cache", "target": "/usr/local/rustup", "type": "volume" } ], - // Features to add to the dev container. More info: https://containers.dev/features. "features": { + "ghcr.io/devcontainers/features/common-utils:2": {}, "ghcr.io/devcontainers/features/github-cli:1": {} }, - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "cargo check", - + "postCreateCommand": "./.devcontainer/init.sh", // Configure tool-specific properties. "customizations": { // Configure properties specific to VS Code. @@ -38,16 +36,8 @@ }, "extensions": [ "bytecodealliance.wit-idl", - "github.vscode-github-actions", - "ms-azuretools.vscode-containers", - "rust-lang.rust-analyzer", - "streetsidesoftware.code-spell-checker", - "tamasfe.even-better-toml", - "vadimcn.vscode-lldb" + "tamasfe.even-better-toml" ] } } - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} +} \ No newline at end of file diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh new file mode 100755 index 0000000..e8eb4d8 --- /dev/null +++ b/.devcontainer/init.sh @@ -0,0 +1,14 @@ +!/usr/bin/env bash + +# Setup script run once for new devcontainers to init the environment. + +set -euo pipefail + +curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash + +echo "PATH=\"\$(make -s tools-path):\${PATH}\"" >> ~/.zshrc +echo "PATH=\"\$(make -s tools-path):\${PATH}\"" >> ~/.bashrc + +make tools wit + +cargo check diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8f95f19..94f606c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,5 @@ version: 2 updates: - - package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - package-ecosystem: cargo directory: "/" schedule: