From 58842a5428924afb4fb0e739facc457e24d1cb95 Mon Sep 17 00:00:00 2001 From: Marcin Kurek <3824342+marcinkurek@users.noreply.github.com> Date: Mon, 9 Oct 2023 01:00:25 +0000 Subject: [PATCH 1/8] Create devcontainer.json --- .devcontainer/devcontainer.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..a5aa7c9 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/alpine +{ + "name": "Alpine", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:alpine-3.18" + + // 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": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From 15736fe4b0b3e34aefe167d3edc04e3a6c2c7330 Mon Sep 17 00:00:00 2001 From: Marcin Kurek <3824342+marcinkurek@users.noreply.github.com> Date: Mon, 9 Oct 2023 01:29:55 +0000 Subject: [PATCH 2/8] Install dependencies --- .devcontainer/devcontainer.json | 13 +++++++++---- .devcontainer/post-create.sh | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/post-create.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a5aa7c9..dcafa23 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,9 +1,14 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/alpine +// README at: https://github.com/devcontainers/templates/tree/main/src/debian { - "name": "Alpine", + "name": "Debian", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:alpine-3.18" + "image": "mcr.microsoft.com/devcontainers/base:bullseye", + "features": { + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, + "ghcr.io/devcontainers/features/rust:1": {}, + "ghcr.io/devcontainers-contrib/features/pre-commit:2": {} + }, // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, @@ -12,7 +17,7 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "uname -a", + "postCreateCommand": "bash .devcontainer/post-create.sh", // Configure tool-specific properties. // "customizations": {}, diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100644 index 0000000..9fd030c --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +rustup target add wasm32-unknown-unknown +cargo install trunk +pre-commit install From 56912c1b9ed71ca441ef4d3dada455dff4125a3f Mon Sep 17 00:00:00 2001 From: Marcin Kurek <3824342+marcinkurek@users.noreply.github.com> Date: Mon, 9 Oct 2023 01:37:07 +0000 Subject: [PATCH 3/8] Move misplaced comment --- .devcontainer/devcontainer.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dcafa23..006bc28 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,15 +4,14 @@ "name": "Debian", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/base:bullseye", + + // Features to add to the dev container. More info: https://containers.dev/features. "features": { "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, "ghcr.io/devcontainers/features/rust:1": {}, "ghcr.io/devcontainers-contrib/features/pre-commit:2": {} }, - // 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": [], From 48d9ac2c1620d868ff1ca9fc3407dd1c0040603d Mon Sep 17 00:00:00 2001 From: Marcin Kurek <3824342+marcinkurek@users.noreply.github.com> Date: Mon, 9 Oct 2023 01:42:39 +0000 Subject: [PATCH 4/8] Install TechTheAwesome.rust-yew --- .devcontainer/devcontainer.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 006bc28..93ad11b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -19,7 +19,18 @@ "postCreateCommand": "bash .devcontainer/post-create.sh", // Configure tool-specific properties. - // "customizations": {}, + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + // "settings": {}, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "TechTheAwesome.rust-yew" + ] + } + } // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" From a9ddd9d164925dbdda1a8f739ecea0a39f74bc69 Mon Sep 17 00:00:00 2001 From: Marcin Kurek <3824342+marcinkurek@users.noreply.github.com> Date: Mon, 9 Oct 2023 02:18:46 +0000 Subject: [PATCH 5/8] Change the base image from Debian to Rust --- .devcontainer/devcontainer.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 93ad11b..1caab04 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,22 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/debian +// README at: https://github.com/devcontainers/templates/tree/main/src/rust { - "name": "Debian", + "name": "Rust", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", + "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye", + + // 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": { "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, - "ghcr.io/devcontainers/features/rust:1": {}, "ghcr.io/devcontainers-contrib/features/pre-commit:2": {} }, From 6802e53bc258bb7bbde93b0a71d69d4b76dcf00b Mon Sep 17 00:00:00 2001 From: Marcin Kurek <3824342+marcinkurek@users.noreply.github.com> Date: Mon, 9 Oct 2023 08:02:35 +0000 Subject: [PATCH 6/8] Add launch.json --- .vscode/launch.json | 101 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..a68ac71 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,101 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'chombo-gen-common'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=chombo-gen-common" + ], + "filter": { + "name": "chombo-gen-common", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'chombo-gen-backend'", + "cargo": { + "args": [ + "build", + "--bin=chombo-gen-backend", + "--package=chombo-gen-backend" + ], + "filter": { + "name": "chombo-gen-backend", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'chombo-gen-backend'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=chombo-gen-backend", + "--package=chombo-gen-backend" + ], + "filter": { + "name": "chombo-gen-backend", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'chombo-gen-frontend'", + "cargo": { + "args": [ + "build", + "--bin=chombo-gen-frontend", + "--package=chombo-gen-frontend" + ], + "filter": { + "name": "chombo-gen-frontend", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'chombo-gen-frontend'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=chombo-gen-frontend", + "--package=chombo-gen-frontend" + ], + "filter": { + "name": "chombo-gen-frontend", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} From d0e4a5111ee00a57fa24c82409cdd57cf6828ad2 Mon Sep 17 00:00:00 2001 From: Marcin Kurek <3824342+marcinkurek@users.noreply.github.com> Date: Tue, 10 Oct 2023 18:07:09 +0000 Subject: [PATCH 7/8] Upgrade to bookworm --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1caab04..42cd5ef 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "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-bullseye", + "image": "mcr.microsoft.com/devcontainers/rust:1-1-bookworm", // Use 'mounts' to make the cargo cache persistent in a Docker Volume. // "mounts": [ @@ -11,7 +11,7 @@ // "source": "devcontainer-cargo-cache-${devcontainerId}", // "target": "/usr/local/cargo", // "type": "volume" - // }>> + // } // ] // Features to add to the dev container. More info: https://containers.dev/features. From b06c3694c934f4ecb046b86fa33eddc59d028a1d Mon Sep 17 00:00:00 2001 From: Marcin Kurek <3824342+marcinkurek@users.noreply.github.com> Date: Tue, 10 Oct 2023 18:07:17 +0000 Subject: [PATCH 8/8] Remove launch.json --- .vscode/launch.json | 101 -------------------------------------------- 1 file changed, 101 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index a68ac71..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'chombo-gen-common'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=chombo-gen-common" - ], - "filter": { - "name": "chombo-gen-common", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'chombo-gen-backend'", - "cargo": { - "args": [ - "build", - "--bin=chombo-gen-backend", - "--package=chombo-gen-backend" - ], - "filter": { - "name": "chombo-gen-backend", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'chombo-gen-backend'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=chombo-gen-backend", - "--package=chombo-gen-backend" - ], - "filter": { - "name": "chombo-gen-backend", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'chombo-gen-frontend'", - "cargo": { - "args": [ - "build", - "--bin=chombo-gen-frontend", - "--package=chombo-gen-frontend" - ], - "filter": { - "name": "chombo-gen-frontend", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'chombo-gen-frontend'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=chombo-gen-frontend", - "--package=chombo-gen-frontend" - ], - "filter": { - "name": "chombo-gen-frontend", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - } - ] -}