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
5 changes: 5 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
19 changes: 8 additions & 11 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,29 @@
{
"name": "componentized-oci",
"image": "mcr.microsoft.com/devcontainers/rust",
"runArgs": [
"--name=componentized-oci"
],
// 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": "./scripts/init-devcontainer.sh",
"postCreateCommand": "./.devcontainer/init.sh",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
Expand All @@ -32,15 +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"
}
14 changes: 14 additions & 0 deletions .devcontainer/init.sh
Original file line number Diff line number Diff line change
@@ -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
Loading