From 21a2807e971ac6537729ad02a9ac920ece27989e Mon Sep 17 00:00:00 2001 From: brettheap Date: Fri, 24 Oct 2025 05:15:10 -0400 Subject: [PATCH 1/4] chore: init repo --- .devcontainer/.env.example | 29 +++ .devcontainer/BUILD_FIXES.md | 249 +++++++++++++++++++++ .devcontainer/Dockerfile | 156 +++++++++++++ .devcontainer/devcontainer.json | 102 +++++++++ .devcontainer/docker-compose.yml | 48 ++++ .devcontainer/post-create.sh | 324 +++++++++++++++++++++++++++ .gitignore | 199 +++++++++++++++++ README.md | 1 + scripts/launch-devbench.sh | 78 +++++++ scripts/new-cpp-project.sh | 365 +++++++++++++++++++++++++++++++ scripts/start-monster.ps1 | 129 +++++++++++ scripts/start-monster.sh | 168 ++++++++++++++ 12 files changed, 1848 insertions(+) create mode 100755 .devcontainer/.env.example create mode 100755 .devcontainer/BUILD_FIXES.md create mode 100755 .devcontainer/Dockerfile create mode 100755 .devcontainer/devcontainer.json create mode 100755 .devcontainer/docker-compose.yml create mode 100755 .devcontainer/post-create.sh create mode 100755 .gitignore create mode 100755 README.md create mode 100755 scripts/launch-devbench.sh create mode 100755 scripts/new-cpp-project.sh create mode 100755 scripts/start-monster.ps1 create mode 100755 scripts/start-monster.sh diff --git a/.devcontainer/.env.example b/.devcontainer/.env.example new file mode 100755 index 0000000..52e0470 --- /dev/null +++ b/.devcontainer/.env.example @@ -0,0 +1,29 @@ +# C++ Heavy Development Environment Variables +# Copy this file to .env and customize as needed + +# Compiler Settings +CC=/usr/bin/gcc-12 +CXX=/usr/bin/g++-12 + +# Package Manager Settings +VCPKG_ROOT=/opt/vcpkg +CONAN_USER_HOME=/home/vscode/.conan2 + +# Build Configuration +CMAKE_BUILD_TYPE=Debug +CMAKE_GENERATOR=Ninja + +# Development Settings +WORKSPACE_DIR=/workspace +PROJECT_NAME=cppBench + +# Debug and Analysis Tools +ENABLE_ASAN=0 +ENABLE_TSAN=0 +ENABLE_VALGRIND=0 + +# Performance Settings +BUILD_PARALLEL_JOBS=0 # 0 = auto-detect + +# Git Configuration (will be overridden by user settings) +GIT_DEFAULT_BRANCH=main \ No newline at end of file diff --git a/.devcontainer/BUILD_FIXES.md b/.devcontainer/BUILD_FIXES.md new file mode 100755 index 0000000..c84f171 --- /dev/null +++ b/.devcontainer/BUILD_FIXES.md @@ -0,0 +1,249 @@ +# C++ Development Environment - Build Fixes and Troubleshooting + +This document contains common build issues and their solutions for the C++ Heavy Development Environment. + +## Common Build Issues + +### 1. Compiler Issues + +#### GCC/G++ Not Found +```bash +# Check if compilers are properly installed +which gcc g++ clang clang++ + +# If missing, reinstall build essentials +sudo apt-get update +sudo apt-get install -y build-essential gcc-12 g++-12 +``` + +#### Wrong Compiler Version +```bash +# Check current versions +gcc --version +g++ --version + +# Update alternatives if needed +sudo update-alternatives --config gcc +sudo update-alternatives --config g++ +``` + +### 2. CMake Issues + +#### CMake Version Too Old +```bash +# Check CMake version +cmake --version + +# If version is < 3.16, update CMake +sudo apt-get install -y cmake +``` + +#### CMake Can't Find Packages +```bash +# Update CMake module path +export CMAKE_MODULE_PATH=/usr/share/cmake/Modules:$CMAKE_MODULE_PATH + +# Or specify package location explicitly +cmake -DCMAKE_PREFIX_PATH=/usr/local .. +``` + +### 3. Package Manager Issues + +#### vcpkg Integration Problems +```bash +# Re-run vcpkg integration +/opt/vcpkg/vcpkg integrate install + +# Check integration status +/opt/vcpkg/vcpkg integrate remove +/opt/vcpkg/vcpkg integrate install +``` + +#### Conan Profile Issues +```bash +# Reset Conan profile +conan profile detect --force + +# Check profile settings +conan profile show default +``` + +### 4. Library and Dependency Issues + +#### Missing Development Headers +```bash +# Install common development libraries +sudo apt-get install -y \ + libssl-dev \ + libcurl4-openssl-dev \ + libboost-all-dev \ + libeigen3-dev \ + libgtest-dev \ + libgmock-dev +``` + +#### GTest Not Found +```bash +# Build and install GTest manually +cd /usr/src/gtest +sudo cmake CMakeLists.txt +sudo make +sudo cp lib/*.a /usr/lib +sudo mkdir -p /usr/local/lib/gtest +sudo ln -s /usr/lib/libgtest.a /usr/local/lib/gtest/libgtest.a +sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/gtest/libgtest_main.a +``` + +### 5. Debugging Issues + +#### GDB Not Working in Container +```bash +# Ensure container runs with proper capabilities +# Add to docker run command or docker-compose: +--cap-add=SYS_PTRACE --security-opt seccomp=unconfined +``` + +#### Valgrind Issues +```bash +# Install valgrind if missing +sudo apt-get install -y valgrind + +# Run with proper options +valgrind --tool=memcheck --leak-check=full ./your_program +``` + +### 6. Performance Issues + +#### Slow Compilation +```bash +# Use parallel compilation +make -j$(nproc) +# or with CMake +cmake --build . --parallel $(nproc) + +# Use Ninja generator for faster builds +cmake -GNinja .. +ninja +``` + +#### Large Binary Size +```bash +# Strip debug symbols for release +strip your_binary + +# Use release build type +cmake -DCMAKE_BUILD_TYPE=Release .. +``` + +### 7. Static Analysis Issues + +#### Clang-Tidy Not Working +```bash +# Generate compile_commands.json +cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. + +# Run clang-tidy +clang-tidy src/*.cpp -- -std=c++20 +``` + +#### CppCheck Issues +```bash +# Run cppcheck with proper options +cppcheck --enable=all --std=c++20 src/ +``` + +### 8. IDE Integration Issues + +#### VS Code IntelliSense Problems +1. Ensure C++ extension is installed +2. Generate `compile_commands.json`: + ```bash + cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. + ``` +3. Update `c_cpp_properties.json` if needed + +#### Missing Extensions +```bash +# Reinstall VS Code extensions +code --install-extension ms-vscode.cpptools +code --install-extension ms-vscode.cmake-tools +``` + +### 9. Container-Specific Issues + +#### Permission Denied +```bash +# Fix file permissions +sudo chown -R vscode:vscode /workspace +chmod -R 755 /workspace +``` + +#### Port Not Accessible +- Ensure ports are forwarded in `devcontainer.json` +- Check firewall settings on host machine + +### 10. Environment Variables + +#### PATH Issues +```bash +# Add to ~/.bashrc +export PATH="/opt/vcpkg:$PATH" +export VCPKG_ROOT="/opt/vcpkg" + +# Reload bash configuration +source ~/.bashrc +``` + +## Quick Fixes + +### Reset Development Environment +```bash +# Clean build directory +rm -rf build/ +mkdir build && cd build + +# Reconfigure and build +cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake --build . --parallel $(nproc) +``` + +### Update All Tools +```bash +# Update system packages +sudo apt-get update && sudo apt-get upgrade -y + +# Update vcpkg +cd /opt/vcpkg && git pull && ./bootstrap-vcpkg.sh + +# Update Conan +pip3 install --upgrade conan +``` + +## Getting Help + +1. Check the build logs carefully +2. Verify all dependencies are installed +3. Ensure proper compiler and CMake versions +4. Test with a minimal example first +5. Check container capabilities and security settings + +## Useful Commands + +```bash +# System information +lsb_release -a +gcc --version +cmake --version +vcpkg version +conan --version + +# Build information +ldd your_binary # Check shared library dependencies +objdump -t your_binary # Check symbol table +readelf -h your_binary # Check ELF header + +# Resource usage +htop # System resource monitor +valgrind --tool=massif # Memory profiler +gprof # Performance profiler +``` \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100755 index 0000000..2038f02 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,156 @@ +# Heavy C++ Development Environment +# Based on Ubuntu 22.04 with comprehensive C++ toolchain +FROM ubuntu:22.04 + +# Avoid prompts from apt +ENV DEBIAN_FRONTEND=noninteractive + +# Set timezone +ENV TZ=UTC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +# Create development user +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +# Update and install system dependencies +RUN apt-get update && apt-get install -y \ + # Essential build tools + build-essential \ + cmake \ + ninja-build \ + make \ + autotools-dev \ + automake \ + autoconf \ + libtool \ + pkg-config \ + # Modern C++ compilers + gcc-12 \ + g++-12 \ + clang-15 \ + clang++-15 \ + clang-tools-15 \ + clang-tidy-15 \ + clang-format-15 \ + # LLVM tools + llvm-15 \ + llvm-15-dev \ + # Debuggers and profilers + gdb \ + valgrind \ + strace \ + ltrace \ + # Static analysis tools + cppcheck \ + vera++ \ + # Documentation tools + doxygen \ + graphviz \ + # Version control + git \ + git-lfs \ + # Network tools + curl \ + wget \ + # Text editors and utilities + vim \ + nano \ + tree \ + htop \ + # Python for scripting and tools + python3 \ + python3-pip \ + # Development libraries + libssl-dev \ + libcurl4-openssl-dev \ + libboost-all-dev \ + libeigen3-dev \ + libgtest-dev \ + libgmock-dev \ + # Compression and archiving + zip \ + unzip \ + tar \ + gzip \ + # Additional utilities + jq \ + bat \ + fd-find \ + ripgrep \ + && rm -rf /var/lib/apt/lists/* + +# Install vcpkg (C++ package manager) +RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg \ + && cd /opt/vcpkg \ + && ./bootstrap-vcpkg.sh \ + && ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg + +# Install Conan (Alternative C++ package manager) +RUN pip3 install conan + +# Install additional modern C++ tools +RUN pip3 install \ + conan \ + pre-commit \ + cpplint \ + cmake-format \ + cmakelang + +# Set up alternatives for compilers +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 \ + && update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 \ + && update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100 + +# Create user +RUN groupadd --gid $USER_GID $USERNAME \ + && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ + && apt-get update \ + && apt-get install -y sudo \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + && chmod 0440 /etc/sudoers.d/$USERNAME \ + && rm -rf /var/lib/apt/lists/* + +# Set up development workspace +RUN mkdir -p /workspace \ + && chown -R $USERNAME:$USERNAME /workspace \ + && chmod -R 755 /workspace + +# Configure git (will be overridden by user) +RUN git config --system user.name "Developer" \ + && git config --system user.email "developer@example.com" \ + && git config --system init.defaultBranch main + +# Set up environment variables +ENV VCPKG_ROOT=/opt/vcpkg +ENV PATH="$VCPKG_ROOT:$PATH" +ENV CC=/usr/bin/gcc-12 +ENV CXX=/usr/bin/g++-12 + +# Create common project directories +RUN mkdir -p /workspace/projects \ + && mkdir -p /workspace/builds \ + && mkdir -p /workspace/install \ + && mkdir -p /workspace/tests \ + && chown -R $USERNAME:$USERNAME /workspace + +# Switch to development user +USER $USERNAME + +# Set up user-specific configurations +RUN echo 'alias ll="ls -alF"' >> ~/.bashrc \ + && echo 'alias la="ls -A"' >> ~/.bashrc \ + && echo 'alias l="ls -CF"' >> ~/.bashrc \ + && echo 'export PATH="$PATH:/opt/vcpkg"' >> ~/.bashrc \ + && echo 'export VCPKG_ROOT=/opt/vcpkg' >> ~/.bashrc + +# Set working directory +WORKDIR /workspace + +# Expose common development ports +EXPOSE 8000 8080 3000 5000 9090 + +# Default command +CMD ["/bin/bash"] \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100755 index 0000000..11083da --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,102 @@ +{ + "name": "C++ Heavy Development Environment", + "build": { + "dockerfile": "Dockerfile", + "context": ".", + "args": { + "USERNAME": "vscode", + "USER_UID": "1000", + "USER_GID": "1000" + } + }, + "runArgs": [ + "--cap-add=SYS_PTRACE", + "--security-opt", + "seccomp=unconfined", + "--ulimit", + "core=-1" + ], + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.defaultProfile.linux": "bash", + "cmake.configureOnOpen": false, + "C_Cpp.default.cppStandard": "c++20", + "C_Cpp.default.cStandard": "c17", + "C_Cpp.default.compilerPath": "/usr/bin/g++", + "C_Cpp.default.intelliSenseMode": "linux-gcc-x64", + "C_Cpp.clang_format_fallbackStyle": "Google", + "editor.formatOnSave": true, + "files.associations": { + "*.h": "cpp", + "*.hpp": "cpp", + "*.cpp": "cpp", + "*.cc": "cpp", + "*.cxx": "cpp", + "CMakeLists.txt": "cmake", + "*.cmake": "cmake" + } + }, + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cpptools-extension-pack", + "ms-vscode.cmake-tools", + "twxs.cmake", + "ms-vscode.cpptools-themes", + "xaver.clang-format", + "jbenden.c-cpp-flylint", + "vadimcn.vscode-lldb", + "ms-python.python", + "ms-python.flake8", + "ms-python.black-formatter", + "formulahendry.code-runner", + "gruntfuggly.todo-tree", + "streetsidesoftware.code-spell-checker", + "ms-vscode.hexeditor", + "ms-vsliveshare.vsliveshare", + "github.copilot", + "github.copilot-chat", + "eamodio.gitlens", + "mhutchie.git-graph", + "shd101wyy.markdown-preview-enhanced", + "yzhang.markdown-all-in-one" + ] + } + }, + "containerEnv": { + "VCPKG_ROOT": "/opt/vcpkg", + "CC": "/usr/bin/gcc-12", + "CXX": "/usr/bin/g++-12" + }, + "remoteUser": "vscode", + "workspaceFolder": "/workspace", + "mounts": [ + "source=cppbench-bashhistory,target=/home/vscode/.bash_history,type=volume", + "source=cppbench-vscode,target=/home/vscode/.vscode-server,type=volume" + ], + "postCreateCommand": ".devcontainer/post-create.sh", + "features": { + "ghcr.io/devcontainers/features/git:1": { + "version": "latest", + "ppa": true + }, + "ghcr.io/devcontainers/features/github-cli:1": { + "version": "latest" + } + }, + "forwardPorts": [8000, 8080, 3000, 5000, 9090], + "portsAttributes": { + "8000": { + "label": "HTTP Server", + "onAutoForward": "notify" + }, + "8080": { + "label": "Development Server", + "onAutoForward": "notify" + }, + "3000": { + "label": "Web App", + "onAutoForward": "openBrowser" + } + } +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100755 index 0000000..602e344 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,48 @@ +version: '3.8' + +services: + cppbench: + build: + context: . + dockerfile: Dockerfile + args: + USERNAME: vscode + USER_UID: 1000 + USER_GID: 1000 + + volumes: + - ../..:/workspace:cached + - cppbench-vscode-server:/home/vscode/.vscode-server + - cppbench-bash-history:/home/vscode/.bash_history + - cppbench-conan:/home/vscode/.conan2 + + # Overrides default command so things don't shut down after the process ends + command: sleep infinity + + # Use "forwardPorts" in **devcontainer.json** to forward an app port locally + ports: + - "8000:8000" + - "8080:8080" + - "3000:3000" + - "5000:5000" + - "9090:9090" + + # Security and debugging settings + cap_add: + - SYS_PTRACE + security_opt: + - seccomp:unconfined + + # Environment variables + environment: + - VCPKG_ROOT=/opt/vcpkg + - CC=/usr/bin/gcc-12 + - CXX=/usr/bin/g++-12 + + # Keep container running + tty: true + +volumes: + cppbench-vscode-server: + cppbench-bash-history: + cppbench-conan: \ No newline at end of file diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100755 index 0000000..3e805d4 --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,324 @@ +#!/bin/bash + +# Post-Create Script for C++ Heavy Development Environment +# This script runs after the container is created to set up the development environment + +set -e + +echo "🔧 Setting up C++ Heavy Development Environment..." + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +print_status() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +print_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +# Update package lists +print_status "Updating package lists..." +sudo apt-get update + +# Install additional development tools that might be needed +print_status "Installing additional development tools..." +sudo apt-get install -y \ + lsb-release \ + software-properties-common \ + apt-transport-https \ + ca-certificates \ + gnupg \ + lsb-release + +# Set up git configuration placeholders +print_status "Setting up Git configuration..." +git config --global init.defaultBranch main +git config --global pull.rebase false +git config --global core.editor "code --wait" + +# Set up vcpkg integration +print_status "Setting up vcpkg integration..." +if [ -d "/opt/vcpkg" ]; then + /opt/vcpkg/vcpkg integrate install + print_success "vcpkg integration completed" +else + print_warning "vcpkg not found, skipping integration" +fi + +# Set up conan profile +print_status "Setting up Conan profile..." +if command -v conan &> /dev/null; then + conan profile detect --force + print_success "Conan profile created" +else + print_warning "Conan not found, skipping profile setup" +fi + +# Create sample project structure +print_status "Creating sample project structure..." +mkdir -p /workspace/projects/sample-cpp +mkdir -p /workspace/builds +mkdir -p /workspace/install +mkdir -p /workspace/tests + +# Create a sample CMakeLists.txt +cat > /workspace/projects/sample-cpp/CMakeLists.txt << 'EOF' +cmake_minimum_required(VERSION 3.16) +project(SampleCppProject VERSION 1.0.0 LANGUAGES CXX) + +# Set C++ standard +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# Compiler-specific options +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wpedantic + -Wno-unused-parameter + ) +endif() + +# Find packages +find_package(Threads REQUIRED) + +# Create executable +add_executable(sample_app + src/main.cpp + src/hello.cpp +) + +target_include_directories(sample_app PRIVATE + include +) + +target_link_libraries(sample_app PRIVATE + Threads::Threads +) + +# Enable testing +enable_testing() +find_package(GTest REQUIRED) + +add_executable(sample_tests + tests/test_hello.cpp + src/hello.cpp +) + +target_include_directories(sample_tests PRIVATE + include +) + +target_link_libraries(sample_tests PRIVATE + GTest::GTest + GTest::Main + Threads::Threads +) + +add_test(NAME SampleTests COMMAND sample_tests) +EOF + +# Create sample source files +mkdir -p /workspace/projects/sample-cpp/src +mkdir -p /workspace/projects/sample-cpp/include +mkdir -p /workspace/projects/sample-cpp/tests + +# Sample header file +cat > /workspace/projects/sample-cpp/include/hello.h << 'EOF' +#pragma once +#include + +namespace sample { + std::string get_greeting(const std::string& name = "World"); + void print_greeting(const std::string& name = "World"); +} +EOF + +# Sample implementation file +cat > /workspace/projects/sample-cpp/src/hello.cpp << 'EOF' +#include "hello.h" +#include + +namespace sample { + std::string get_greeting(const std::string& name) { + return "Hello, " + name + "!"; + } + + void print_greeting(const std::string& name) { + std::cout << get_greeting(name) << std::endl; + } +} +EOF + +# Sample main file +cat > /workspace/projects/sample-cpp/src/main.cpp << 'EOF' +#include "hello.h" +#include +#include +#include + +int main() { + sample::print_greeting("C++ Developer"); + + // Demonstrate modern C++20 features + std::vector numbers = {1, 2, 3, 4, 5}; + + // Range-based for loop + std::cout << "Numbers: "; + for (const auto& num : numbers) { + std::cout << num << " "; + } + std::cout << std::endl; + + // Lambda and algorithms + auto doubled = std::vector{}; + std::transform(numbers.begin(), numbers.end(), std::back_inserter(doubled), + [](int n) { return n * 2; }); + + std::cout << "Doubled: "; + for (const auto& num : doubled) { + std::cout << num << " "; + } + std::cout << std::endl; + + return 0; +} +EOF + +# Sample test file +cat > /workspace/projects/sample-cpp/tests/test_hello.cpp << 'EOF' +#include +#include "hello.h" + +TEST(HelloTest, BasicGreeting) { + EXPECT_EQ(sample::get_greeting("Test"), "Hello, Test!"); +} + +TEST(HelloTest, DefaultGreeting) { + EXPECT_EQ(sample::get_greeting(), "Hello, World!"); +} + +TEST(HelloTest, EmptyName) { + EXPECT_EQ(sample::get_greeting(""), "Hello, !"); +} +EOF + +# Create build script +cat > /workspace/projects/sample-cpp/build.sh << 'EOF' +#!/bin/bash +set -e + +BUILD_DIR="../builds/sample-cpp" +INSTALL_DIR="../install/sample-cpp" + +# Create build directory +mkdir -p "$BUILD_DIR" +cd "$BUILD_DIR" + +# Configure +cmake ../../projects/sample-cpp \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + +# Build +cmake --build . --parallel $(nproc) + +# Test +ctest --output-on-failure + +echo "Build completed successfully!" +echo "Run the sample app: $BUILD_DIR/sample_app" +echo "Run tests: $BUILD_DIR/sample_tests" +EOF + +chmod +x /workspace/projects/sample-cpp/build.sh + +# Create .clang-format file +cat > /workspace/projects/sample-cpp/.clang-format << 'EOF' +--- +Language: Cpp +BasedOnStyle: Google +IndentWidth: 4 +TabWidth: 4 +UseTab: Never +ColumnLimit: 100 +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignOperands: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +BinPackArguments: true +BinPackParameters: true +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Attach +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: false +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakComment: 300 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Auto +EOF + +print_success "Sample C++ project created in /workspace/projects/sample-cpp" + +# Display environment information +print_status "Development Environment Information:" +echo "==================================" +echo "GCC Version: $(gcc --version | head -n1)" +echo "Clang Version: $(clang --version | head -n1)" +echo "CMake Version: $(cmake --version | head -n1)" +echo "Python Version: $(python3 --version)" +echo "Git Version: $(git --version)" + +if command -v vcpkg &> /dev/null; then + echo "vcpkg Version: $(vcpkg version)" +fi + +if command -v conan &> /dev/null; then + echo "Conan Version: $(conan --version)" +fi + +print_success "Post-create setup completed!" +print_status "Ready for heavy C++ development! 🚀" +print_status "Sample project available at: /workspace/projects/sample-cpp" +print_status "Run 'cd /workspace/projects/sample-cpp && ./build.sh' to build the sample project" \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..6d03b1d --- /dev/null +++ b/.gitignore @@ -0,0 +1,199 @@ +# C++ Heavy Development Environment .gitignore + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# CMake generated files +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles/ +CMakeScripts/ +Testing/ +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +# Build directories +build/ +builds/ +out/ +bin/ +lib/ +Debug/ +Release/ +x64/ +x86/ +MinSizeRel/ +RelWithDebInfo/ + +# Ninja +.ninja_deps +.ninja_log +build.ninja + +# Qt-related +*.pro.user +*.pro.user.* +*.qbs.user +*.qbs.user.* +*.moc +moc_*.cpp +moc_*.h +qrc_*.cpp +ui_*.h + +# QtCreator +*.autosave +*.creator +*.creator.* +*.files +*.includes +*.config +*.cflags +*.cxxflags + +# Visual Studio / Visual Studio Code +.vs/ +.vscode/ +*.vcxproj +*.vcxproj.filters +*.vcxproj.user +*.sln +*.suo +*.user +*.userosscache +*.sln.docstates + +# CLion +.idea/ +cmake-build-*/ + +# Code::Blocks +*.depend +*.layout +*.cbp + +# Conan +conanfile.txt +conandata.yml +conaninfo.txt +conanbuild.txt +conanrunenv.txt +graph_info.json +.conan/ + +# vcpkg +vcpkg_installed/ +.vcpkg-root + +# Package managers +*.cmake.in +*-config.cmake +*-config-version.cmake + +# Testing +CTestTestfile.cmake +Testing/ +test_results/ +*.xml + +# Profiling +*.prof +gmon.out +*.gcda +*.gcno +*.gcov +callgrind.out.* +cachegrind.out.* +massif.out.* + +# Debugging +core +*.dSYM/ +*.pdb + +# Static analysis +*.sarif +cppcheck-*.xml +scan-build-*/ + +# Documentation +doc/ +docs/html/ +docs/latex/ +Doxygen/ + +# Backup files +*~ +*.orig +*.bak +*.swp +*.swo +*.tmp + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Environment files +.env +.env.local +.env.production +.envrc + +# Logs +*.log +logs/ + +# IDE and editor files +*.kate-swp +.project +.cproject +.settings/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# pipenv +Pipfile.lock + +# Ignore installed packages from vcpkg +packages/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100755 index 0000000..b439deb --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# cppBench diff --git a/scripts/launch-devbench.sh b/scripts/launch-devbench.sh new file mode 100755 index 0000000..16ab851 --- /dev/null +++ b/scripts/launch-devbench.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +# C++ Heavy Development Environment Launcher +# Launches the devcontainer for C++ development + +set -e + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +print_info() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +print_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +# Check if Docker is running +if ! docker info > /dev/null 2>&1; then + print_error "Docker is not running. Please start Docker first." + exit 1 +fi + +# Check if VS Code is installed +if ! command -v code &> /dev/null; then + print_error "VS Code is not installed or not in PATH." + print_info "Please install VS Code and the Dev Containers extension." + exit 1 +fi + +# Check for Dev Containers extension +print_info "Checking for VS Code Dev Containers extension..." + +# Get the script directory +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +print_info "🚀 Launching C++ Heavy Development Environment..." +print_info "This will build and start the devcontainer if needed." + +# Change to the bench directory (parent of scripts) +BENCH_DIR="$(dirname "$SCRIPT_DIR")" +cd "$BENCH_DIR" + +# Launch VS Code with devcontainer +print_info "Opening VS Code devcontainer..." +code . + +print_success "C++ Heavy Development Environment launched!" +print_info "VS Code should open the devcontainer automatically." +print_info "" +print_info "📚 Quick Start:" +print_info " 1. Wait for the container to build (first time only)" +print_info " 2. Open terminal in VS Code" +print_info " 3. Navigate to sample project: cd /workspace/projects/sample-cpp" +print_info " 4. Build sample project: ./build.sh" +print_info "" +print_info "🔧 Environment Features:" +print_info " • GCC 12 and Clang 15 compilers" +print_info " • CMake and Ninja build systems" +print_info " • vcpkg and Conan package managers" +print_info " • GDB, Valgrind, and static analysis tools" +print_info " • Google Test framework" +print_info " • Full VS Code C++ extension suite" +print_info "" +print_info "📖 For troubleshooting, see .devcontainer/BUILD_FIXES.md" \ No newline at end of file diff --git a/scripts/new-cpp-project.sh b/scripts/new-cpp-project.sh new file mode 100755 index 0000000..6c06414 --- /dev/null +++ b/scripts/new-cpp-project.sh @@ -0,0 +1,365 @@ +#!/bin/bash + +# C++ DevContainer Project Creation Script +# Creates a new C++ project with development container setup + +set -e + +PROJECT_NAME=$1 +TARGET_DIR=$2 + +# Validate project name is provided +if [ -z "$PROJECT_NAME" ]; then + echo "Usage: ./new-cpp-project.sh [target-directory]" + echo "Examples:" + echo " ./new-cpp-project.sh myapp # Creates ~/projects/myapp" + echo " ./new-cpp-project.sh myapp ../../MyProjects # Creates ../../MyProjects/myapp" + echo "" + echo "This script will:" + echo " 1. Create a new C++ project with CMake" + echo " 2. Copy DevContainer and VS Code configurations" + echo " 3. Set up build system and dependencies" + echo " 4. Configure Docker for development" + echo "" + exit 1 +fi + +# If no target directory specified, default to ~/projects/ +if [ -z "$TARGET_DIR" ]; then + TARGET_DIR="$HOME/projects" + PROJECT_PATH="$TARGET_DIR/$PROJECT_NAME" + + # Check if project already exists + if [ -d "$PROJECT_PATH" ]; then + echo "❌ Error: Project already exists at $PROJECT_PATH" + echo "Please choose a different project name or remove the existing project." + exit 1 + fi + + # Create the target directory if it doesn't exist + if [ ! -d "$TARGET_DIR" ]; then + echo "📁 Creating projects directory: $TARGET_DIR" + mkdir -p "$TARGET_DIR" + fi +else + PROJECT_PATH="$TARGET_DIR/$PROJECT_NAME" + + # Check if project already exists in specified directory + if [ -d "$PROJECT_PATH" ]; then + echo "❌ Error: Project already exists at $PROJECT_PATH" + echo "Please choose a different project name or remove the existing project." + exit 1 + fi +fi + +echo "⚡ Creating C++ project: $PROJECT_NAME" +echo "📍 Project path: $PROJECT_PATH" + +# Create project directory +mkdir -p "$PROJECT_PATH" +cd "$PROJECT_PATH" + +# Create C++ project structure +echo "📋 Creating C++ project structure..." +mkdir -p src include tests build docs + +# Create CMakeLists.txt +cat > CMakeLists.txt << EOF +cmake_minimum_required(VERSION 3.20) + +project($PROJECT_NAME VERSION 1.0.0 LANGUAGES CXX) + +# Set C++ standard +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# Set compiler flags +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + +# Set build type +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +# Include directories +include_directories(include) + +# Add executable +add_executable(\${PROJECT_NAME} src/main.cpp) + +# Optional: Add library if you have multiple source files +# add_library(\${PROJECT_NAME}_lib src/example.cpp) +# target_link_libraries(\${PROJECT_NAME} \${PROJECT_NAME}_lib) + +# Optional: Enable testing +# enable_testing() +# add_subdirectory(tests) + +# Installation +install(TARGETS \${PROJECT_NAME} DESTINATION bin) +EOF + +# Create main.cpp +cat > src/main.cpp << EOF +#include +#include + +int main() { + std::string projectName = "$PROJECT_NAME"; + std::cout << "Hello from " << projectName << "!" << std::endl; + std::cout << "Welcome to C++ development!" << std::endl; + return 0; +} +EOF + +# Create example header +cat > include/example.h << EOF +#ifndef EXAMPLE_H +#define EXAMPLE_H + +#include + +namespace $PROJECT_NAME { + class Example { + public: + Example(); + std::string getMessage() const; + + private: + std::string message_; + }; +} + +#endif // EXAMPLE_H +EOF + +# Create example implementation +cat > src/example.cpp << EOF +#include "example.h" + +namespace $PROJECT_NAME { + Example::Example() : message_("Hello from Example class!") {} + + std::string Example::getMessage() const { + return message_; + } +} +EOF + +# Create basic test (if using Google Test) +cat > tests/test_example.cpp << EOF +// Uncomment and modify this if you add Google Test +/* +#include +#include "example.h" + +TEST(ExampleTest, GetMessage) { + $PROJECT_NAME::Example example; + EXPECT_EQ(example.getMessage(), "Hello from Example class!"); +} + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} +*/ + +// Simple test without Google Test framework +#include +#include + +int main() { + std::cout << "Running basic tests..." << std::endl; + + // Add your tests here + assert(true); // Example assertion + + std::cout << "All tests passed!" << std::endl; + return 0; +} +EOF + +# Create build script +cat > build.sh << EOF +#!/bin/bash +set -e + +BUILD_TYPE=\${1:-Release} +BUILD_DIR="build/\$BUILD_TYPE" + +echo "Building $PROJECT_NAME in \$BUILD_TYPE mode..." + +# Create build directory +mkdir -p "\$BUILD_DIR" + +# Configure with CMake +cd "\$BUILD_DIR" +cmake -DCMAKE_BUILD_TYPE=\$BUILD_TYPE ../../ + +# Build +make -j\$(nproc) + +echo "Build complete! Executable: \$BUILD_DIR/$PROJECT_NAME" +EOF + +chmod +x build.sh + +# Create README.md +cat > README.md << EOF +# $PROJECT_NAME + +A C++ project with development container setup. + +## Getting Started + +This project uses VS Code DevContainers for a consistent development environment. + +### Prerequisites + +- Docker Desktop +- VS Code with Remote-Containers extension + +### Development Setup + +1. Open this project in VS Code +2. When prompted, click "Reopen in Container" +3. Wait for the container to build (first time: ~5-10 minutes) +4. Start developing! + +### Project Structure + +\`\`\` +├── src/ # Source files +│ ├── main.cpp +│ └── example.cpp +├── include/ # Header files +│ └── example.h +├── tests/ # Test files +│ └── test_example.cpp +├── build/ # Build artifacts (generated) +├── docs/ # Documentation +├── CMakeLists.txt # CMake configuration +├── build.sh # Build script +└── README.md # This file +\`\`\` + +### Building the Project + +#### Using the build script (recommended): +\`\`\`bash +./build.sh # Release build +./build.sh Debug # Debug build +\`\`\` + +#### Manual CMake build: +\`\`\`bash +mkdir -p build/Release +cd build/Release +cmake -DCMAKE_BUILD_TYPE=Release ../../ +make -j\$(nproc) +\`\`\` + +### Running the Project + +After building: +\`\`\`bash +./build/Release/$PROJECT_NAME +\`\`\` + +### Available Commands + +- \`./build.sh\` - Build the project (Release mode) +- \`./build.sh Debug\` - Build in debug mode +- \`make clean\` - Clean build artifacts (from build directory) + +### Development Features + +This project includes: + +- C++20 standard +- CMake build system +- Proper project structure +- Example class and header +- Basic testing setup +- Compiler warnings enabled +- Cross-platform compatibility + +## Adding Dependencies + +To add external libraries, modify \`CMakeLists.txt\`: + +\`\`\`cmake +# Example: Adding a library +find_package(SomeLibrary REQUIRED) +target_link_libraries(\${PROJECT_NAME} SomeLibrary::SomeLibrary) +\`\`\` + +## License + +This project is licensed under the MIT License. +EOF + +# Create basic .gitignore +cat > .gitignore << EOF +# Build artifacts +build/ +*.o +*.a +*.so +*.exe + +# CMake +CMakeCache.txt +CMakeFiles/ +cmake_install.cmake +Makefile +*.cmake +!CMakeLists.txt + +# IDE files +.vscode/settings.json +.idea/ +*.swp +*.swo + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# DevContainer +.devcontainer/docker-compose.override.yml +EOF + +echo "" +echo "✅ C++ project created successfully: $PROJECT_PATH" +echo "" +echo "📝 Next steps:" +echo " 1. cd $PROJECT_PATH" +echo " 2. code ." +echo " 3. When prompted, click 'Reopen in Container'" +echo " 4. Wait for container build (first time: ~5-10 minutes)" +echo " 5. Container will automatically:" +echo " - Install C++ compiler (GCC/Clang)" +echo " - Install CMake and build tools" +echo " - Set up development environment" +echo "" +echo "⚡ Development commands:" +echo " - ./build.sh : Build project (Release)" +echo " - ./build.sh Debug : Build project (Debug)" +echo " - ./build/Release/$PROJECT_NAME : Run application" +echo "" +echo "🛠️ Project features:" +echo " - C++20 standard" +echo " - CMake build system" +echo " - Example class structure" +echo " - Basic testing setup" +echo "" +echo "🎯 Happy C++ Development with Spec-Driven Development!" \ No newline at end of file diff --git a/scripts/start-monster.ps1 b/scripts/start-monster.ps1 new file mode 100755 index 0000000..fd95faf --- /dev/null +++ b/scripts/start-monster.ps1 @@ -0,0 +1,129 @@ +# C++ Heavy Development Environment Launcher (PowerShell) +# Launches the devcontainer for C++ development on Windows + +param( + [switch]$Help, + [switch]$Rebuild +) + +# Color functions +function Write-Info { + param([string]$Message) + Write-Host "[INFO] $Message" -ForegroundColor Blue +} + +function Write-Success { + param([string]$Message) + Write-Host "[SUCCESS] $Message" -ForegroundColor Green +} + +function Write-Warning { + param([string]$Message) + Write-Host "[WARNING] $Message" -ForegroundColor Yellow +} + +function Write-Error { + param([string]$Message) + Write-Host "[ERROR] $Message" -ForegroundColor Red +} + +# Help text +if ($Help) { + Write-Host "C++ Heavy Development Environment Launcher" -ForegroundColor Cyan + Write-Host "" + Write-Host "Usage:" + Write-Host " .\start-monster.ps1 # Launch the development environment" + Write-Host " .\start-monster.ps1 -Rebuild # Rebuild the container before launching" + Write-Host " .\start-monster.ps1 -Help # Show this help message" + Write-Host "" + Write-Host "Requirements:" + Write-Host " • Docker Desktop for Windows" + Write-Host " • VS Code with Dev Containers extension" + Write-Host " • WSL 2 (recommended)" + exit 0 +} + +Write-Host "🚀 C++ Heavy Development Environment Launcher" -ForegroundColor Cyan +Write-Host "=============================================" -ForegroundColor Cyan + +# Check if Docker is running +Write-Info "Checking Docker status..." +try { + docker info | Out-Null + Write-Success "Docker is running" +} +catch { + Write-Error "Docker is not running or not accessible" + Write-Info "Please start Docker Desktop and try again" + exit 1 +} + +# Check if VS Code is installed +Write-Info "Checking VS Code installation..." +try { + $codeVersion = code --version 2>$null + if ($LASTEXITCODE -eq 0) { + Write-Success "VS Code is installed" + } else { + throw "VS Code not found" + } +} +catch { + Write-Error "VS Code is not installed or not in PATH" + Write-Info "Please install VS Code and the Dev Containers extension" + Write-Info "Download from: https://code.visualstudio.com/" + exit 1 +} + +# Get script directory +$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path +Set-Location $scriptDir + +Write-Info "Script directory: $scriptDir" + +# Rebuild container if requested +if ($Rebuild) { + Write-Info "Rebuilding container..." + try { + docker-compose -f .devcontainer/docker-compose.yml build --no-cache + Write-Success "Container rebuilt successfully" + } + catch { + Write-Error "Failed to rebuild container" + exit 1 + } +} + +# Launch VS Code with devcontainer +Write-Info "🚀 Launching C++ Heavy Development Environment..." +Write-Info "This will build and start the devcontainer if needed." + +try { + code . + Write-Success "VS Code launched successfully!" +} +catch { + Write-Error "Failed to launch VS Code" + exit 1 +} + +Write-Host "" +Write-Host "📚 Quick Start Guide:" -ForegroundColor Cyan +Write-Host " 1. Wait for the container to build (first time only)" +Write-Host " 2. Open terminal in VS Code (Ctrl+``)" +Write-Host " 3. Navigate to sample project: cd /workspace/projects/sample-cpp" +Write-Host " 4. Build sample project: ./build.sh" +Write-Host "" +Write-Host "🔧 Environment Features:" -ForegroundColor Cyan +Write-Host " • Modern C++ compilers (GCC 12, Clang 15)" +Write-Host " • Build systems (CMake, Ninja)" +Write-Host " • Package managers (vcpkg, Conan)" +Write-Host " • Debugging tools (GDB, Valgrind)" +Write-Host " • Static analysis (Clang-Tidy, CppCheck)" +Write-Host " • Testing framework (Google Test)" +Write-Host " • Complete VS Code C++ extension suite" +Write-Host "" +Write-Host "📖 For troubleshooting:" -ForegroundColor Yellow +Write-Host " See .devcontainer/BUILD_FIXES.md" +Write-Host "" +Write-Success "Environment ready for heavy C++ development! 🛠️" \ No newline at end of file diff --git a/scripts/start-monster.sh b/scripts/start-monster.sh new file mode 100755 index 0000000..8e34533 --- /dev/null +++ b/scripts/start-monster.sh @@ -0,0 +1,168 @@ +#!/bin/bash + +# C++ Heavy Development Environment Launcher (Shell Script) +# Alternative launcher for systems without VS Code or for advanced users + +set -e + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +CYAN='\033[0;36m' +NC='\033[0m' # No Color + +print_info() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +print_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +print_header() { + echo -e "${CYAN}$1${NC}" +} + +# Help function +show_help() { + print_header "🚀 C++ Heavy Development Environment Launcher" + print_header "==============================================" + echo "" + echo "Usage:" + echo " $0 [OPTIONS]" + echo "" + echo "Options:" + echo " -h, --help Show this help message" + echo " -r, --rebuild Rebuild the container before launching" + echo " -s, --shell Launch container with shell instead of VS Code" + echo " -d, --daemon Run container in daemon mode" + echo "" + echo "Examples:" + echo " $0 # Launch with VS Code" + echo " $0 --shell # Launch container with bash shell" + echo " $0 --rebuild --shell # Rebuild and launch with shell" + echo "" +} + +# Parse arguments +REBUILD=false +SHELL_MODE=false +DAEMON_MODE=false + +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + show_help + exit 0 + ;; + -r|--rebuild) + REBUILD=true + shift + ;; + -s|--shell) + SHELL_MODE=true + shift + ;; + -d|--daemon) + DAEMON_MODE=true + shift + ;; + *) + print_error "Unknown option: $1" + show_help + exit 1 + ;; + esac +done + +print_header "🚀 C++ Heavy Development Environment" +print_header "====================================" + +# Check if Docker is running +print_info "Checking Docker status..." +if ! docker info > /dev/null 2>&1; then + print_error "Docker is not running. Please start Docker first." + exit 1 +fi +print_success "Docker is running" + +# Get script directory +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd "$SCRIPT_DIR" + +# Rebuild if requested +if [ "$REBUILD" = true ]; then + print_info "Rebuilding container..." + docker-compose -f .devcontainer/docker-compose.yml build --no-cache + print_success "Container rebuilt successfully" +fi + +# Launch based on mode +if [ "$SHELL_MODE" = true ]; then + print_info "🐚 Launching container with bash shell..." + + # Start container if not running + docker-compose -f .devcontainer/docker-compose.yml up -d + + # Execute bash in the container + print_success "Container started. Entering bash shell..." + print_info "Type 'exit' to leave the container" + print_info "" + print_info "📚 Quick commands inside container:" + print_info " cd /workspace/projects/sample-cpp # Go to sample project" + print_info " ./build.sh # Build sample project" + print_info " htop # System monitor" + print_info " gcc --version # Check compiler version" + print_info "" + + docker-compose -f .devcontainer/docker-compose.yml exec cppbench bash + +elif [ "$DAEMON_MODE" = true ]; then + print_info "🔄 Starting container in daemon mode..." + docker-compose -f .devcontainer/docker-compose.yml up -d + print_success "Container is running in the background" + print_info "Connect with: docker-compose -f .devcontainer/docker-compose.yml exec cppbench bash" + +else + # Default VS Code mode + if ! command -v code &> /dev/null; then + print_warning "VS Code not found. Falling back to shell mode..." + SHELL_MODE=true + exec "$0" --shell + fi + + print_info "🚀 Launching VS Code devcontainer..." + code . + print_success "VS Code launched!" +fi + +print_success "C++ Heavy Development Environment ready! 🛠️" + +if [ "$SHELL_MODE" != true ]; then + echo "" + print_header "📚 Quick Start Guide:" + echo " 1. Wait for container to build (first time only)" + echo " 2. Open terminal in VS Code" + echo " 3. Navigate to sample: cd /workspace/projects/sample-cpp" + echo " 4. Build sample: ./build.sh" + echo "" + print_header "🔧 Environment Features:" + echo " • GCC 12 and Clang 15 compilers" + echo " • CMake and Ninja build systems" + echo " • vcpkg and Conan package managers" + echo " • Debugging and profiling tools" + echo " • Static analysis tools" + echo " • Google Test framework" + echo "" + print_warning "For troubleshooting, see .devcontainer/BUILD_FIXES.md" +fi \ No newline at end of file From fa2061ba784b178f49e149f4f97c1096daa5c6d6 Mon Sep 17 00:00:00 2001 From: brettheap Date: Mon, 17 Nov 2025 19:53:17 -0400 Subject: [PATCH 2/4] Add AI CLI authentication setup via override pattern - Add docker-compose.override.example.yml template for AI authentication - Add AI_SETUP.md comprehensive documentation - Update .gitignore to exclude docker-compose.override.yml - Engineers can set up AI assistants (Codex, Claude, Gemini) via personal override file This follows team best practices where personal configurations are in gitignored override files, not in committed compose files. --- .devcontainer/AI_SETUP.md | 305 ++++++++++++++++++ .../docker-compose.override.example.yml | 52 +++ .gitignore | 4 +- 3 files changed, 360 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/AI_SETUP.md create mode 100644 .devcontainer/docker-compose.override.example.yml diff --git a/.devcontainer/AI_SETUP.md b/.devcontainer/AI_SETUP.md new file mode 100644 index 0000000..1f83ff4 --- /dev/null +++ b/.devcontainer/AI_SETUP.md @@ -0,0 +1,305 @@ +# AI Coding Assistant Setup for DevContainers + +This guide explains how to configure your devcontainer to automatically authenticate with AI coding assistants (OpenAI Codex, Anthropic Claude Code, and Google Gemini). + +## Overview + +When working in a devcontainer, AI coding assistant extensions need access to your authentication credentials. This is accomplished by mounting your local authentication directories into the container. + +## Supported AI Assistants + +- **OpenAI Codex** - VS Code extension for ChatGPT/GPT-4 code assistance +- **Anthropic Claude Code** - Claude AI integration for VS Code +- **Google Gemini** - Google's Gemini AI coding assistant + +## Quick Setup + +### 1. Check if You Have Authentication Files + +First, verify that you have authenticated with the AI tools on your host machine: + +```bash +# Check for Codex authentication +ls ~/.codex/ + +# Check for Claude authentication +ls ~/.claude/ + +# Check for Gemini authentication +ls ~/.gemini/ +``` + +If these directories don't exist, you need to authenticate on your host machine first (see "Initial Authentication" section below). + +### 2. Create Override File + +Copy the example override file to create your personal configuration: + +```bash +cd .devcontainer +cp docker-compose.override.example.yml docker-compose.override.yml +``` + +**Important:** The `docker-compose.override.yml` file is automatically gitignored and will not be committed to the repository. + +### 3. Edit Override File + +Open `docker-compose.override.yml` and uncomment the volume mounts for the AI tools you use: + +```yaml +services: + app: # Replace 'app' with your actual service name + volumes: + # Uncomment the lines you need: + - ~/.codex:/home/${USER:-vscode}/.codex:cached + - ~/.claude:/home/${USER:-vscode}/.claude:cached + - ~/.gemini:/home/${USER:-vscode}/.gemini:cached +``` + +**Note:** Make sure to replace `app` with your actual service name from `docker-compose.yml` (e.g., `gateway`, `web`, `dev`, etc.). + +### 4. Rebuild Devcontainer + +After editing the override file: + +1. In VS Code, press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac) +2. Select: **Dev Containers: Rebuild Container** +3. Wait for the container to rebuild + +### 5. Verify Setup + +Once the container is running: + +1. Open a terminal in VS Code +2. Check that the directories are mounted: + +```bash +ls ~/.codex/ +ls ~/.claude/ +ls ~/.gemini/ +``` + +3. Try using an AI coding assistant extension - it should now work without requiring login + +## Initial Authentication + +If you haven't authenticated with the AI tools on your host machine yet, follow these steps: + +### OpenAI Codex Setup + +1. Install the OpenAI Codex CLI on your host: + ```bash + npm install -g @openai/codex + ``` + +2. Authenticate: + ```bash + codex login + ``` + +3. Follow the browser authentication flow + +### Claude Code Setup + +1. Install Claude Code CLI on your host: + ```bash + npm install -g @anthropic-ai/claude-code + ``` + +2. Authenticate: + ```bash + claude login + ``` + +3. Enter your API key when prompted + +### Gemini Setup + +1. Install Gemini CLI on your host: + ```bash + # Installation method varies - check Google's documentation + ``` + +2. Authenticate: + ```bash + gemini auth login + ``` + +3. Follow the authentication flow + +## Troubleshooting + +### AI Assistant Still Asks for Login + +**Problem:** The AI extension is still prompting for authentication inside the container. + +**Solutions:** + +1. **Check service name:** Ensure you replaced `app` with your actual service name in the override file + ```bash + # Check your service name in docker-compose.yml + grep "services:" -A 2 .devcontainer/docker-compose.yml + ``` + +2. **Verify mounts:** Inside the container, check if directories are mounted: + ```bash + ls -la ~/.codex ~/.claude ~/.gemini + ``` + +3. **Check permissions:** Ensure directories are readable: + ```bash + # On host machine + ls -la ~/.codex ~/.claude ~/.gemini + ``` + +4. **Rebuild container:** Sometimes changes require a full rebuild: + ``` + Ctrl+Shift+P → Dev Containers: Rebuild Container Without Cache + ``` + +### Permission Denied Errors + +**Problem:** Container can't read the authentication files. + +**Solution:** + +The files should be readable. If not, fix permissions on your host: + +```bash +chmod -R u+r ~/.codex ~/.claude ~/.gemini +``` + +### Wrong User Path + +**Problem:** Mounts are going to `/root/` instead of `/home/youruser/` + +**Solution:** + +Check that your devcontainer is running as the correct user: + +```bash +# Inside container +echo $USER +id +``` + +If running as root, update your devcontainer configuration to use the correct user. Check `devcontainer.json`: + +```json +{ + "remoteUser": "${localEnv:USER:vscode}" +} +``` + +### Container Name Mismatch + +**Problem:** Override file references wrong service name. + +**Solution:** + +Find your actual service name: + +```bash +# Look at docker-compose.yml +cat .devcontainer/docker-compose.yml | grep "services:" -A 5 +``` + +Common service names: `app`, `web`, `dev`, `service`, `gateway`, `backend` + +Update `docker-compose.override.yml` to use the correct service name. + +## Security Considerations + +### What Gets Mounted + +When you mount these directories, you're providing the container with: + +- **API Keys:** Authentication tokens for AI services +- **Session Data:** Cached responses and user preferences +- **Configuration:** Settings for the AI tools + +### Security Best Practices + +1. **Never commit override files:** The `.gitignore` should include: + ``` + docker-compose.override.yml + ``` + +2. **Read-only mounts (optional):** If you want extra security, use `:ro` flag: + ```yaml + - ~/.codex:/home/${USER}/.codex:ro + ``` + +3. **Revoke access:** If compromised, revoke API keys from the provider's dashboard + +4. **Separate development keys:** Consider using separate API keys for devcontainers vs production + +## Advanced Configuration + +### Multiple Projects, Same Overrides + +If you want the same AI setup across all projects, you can: + +1. Create a template override file +2. Copy it to each project's `.devcontainer/` folder +3. Adjust the service name as needed + +### Custom Mount Locations + +If your AI tools store credentials elsewhere: + +```yaml +services: + app: + volumes: + - ~/custom/path/to/codex:/home/${USER}/.codex:cached +``` + +### Team Best Practices + +For teams: + +1. **Commit the example:** Always commit `docker-compose.override.example.yml` +2. **Document in README:** Add a note about AI setup to your project README +3. **Add to gitignore:** Ensure override files are ignored: + ``` + .devcontainer/docker-compose.override.yml + ``` + +4. **Share setup docs:** Keep this `AI_SETUP.md` updated and committed + +## FAQ + +**Q: Will this work for all AI coding assistants?** +A: This pattern works for any AI tool that stores credentials in your home directory. + +**Q: Do I need all three (Codex, Claude, Gemini)?** +A: No, only uncomment the ones you actually use. + +**Q: Can I add other personal mounts?** +A: Yes! The override file is for your personal customizations. Add whatever you need. + +**Q: What if I don't want to use override files?** +A: You can mount these in `devcontainer.json` using the `mounts` property, but the override pattern is cleaner for team projects. + +**Q: Does this affect performance?** +A: No, the `:cached` flag ensures good performance. The mounted directories are small. + +## Support + +If you encounter issues: + +1. Check this documentation +2. Verify your setup using the troubleshooting section +3. Check the AI assistant's official documentation +4. Ask your team members who have it working + +## File Checklist + +After setup, you should have: + +- ✅ `.devcontainer/docker-compose.yml` - Base configuration (committed) +- ✅ `.devcontainer/docker-compose.override.example.yml` - Template (committed) +- ✅ `.devcontainer/docker-compose.override.yml` - Your config (gitignored) +- ✅ `.devcontainer/AI_SETUP.md` - This documentation (committed) +- ✅ `.gitignore` - Contains `docker-compose.override.yml` diff --git a/.devcontainer/docker-compose.override.example.yml b/.devcontainer/docker-compose.override.example.yml new file mode 100644 index 0000000..170e45a --- /dev/null +++ b/.devcontainer/docker-compose.override.example.yml @@ -0,0 +1,52 @@ +# Docker Compose Override File Example +# =========================================== +# This file enables AI coding assistants (Codex, Claude Code, Gemini) to authenticate +# automatically inside your devcontainer. +# +# SETUP INSTRUCTIONS: +# 1. Copy this file to: docker-compose.override.yml +# cp docker-compose.override.example.yml docker-compose.override.yml +# +# 2. The docker-compose.override.yml file is gitignored and will not be committed +# +# 3. Uncomment the volume mounts below for the AI tools you use +# +# 4. Restart your devcontainer for changes to take effect +# +# For detailed setup instructions, see: AI_SETUP.md + +services: + # Note: Replace 'app' with your actual service name from docker-compose.yml + # Common service names: app, web, dev, service, etc. + cppbench: + volumes: + # ======================================== + # AI Coding Assistant Configurations + # ======================================== + # Uncomment the lines below to enable auto-login for AI assistants + + # OpenAI Codex CLI Authentication + # Required for: VS Code Codex extension, OpenAI CLI tools + # Location: ~/.codex/ contains authentication tokens + # - ~/.codex:/home/${USER:-vscode}/.codex:cached + + # Anthropic Claude Code CLI Authentication + # Required for: VS Code Claude Code extension, Claude CLI tools + # Location: ~/.claude/ contains API keys and session data + # - ~/.claude:/home/${USER:-vscode}/.claude:cached + + # Google Gemini CLI Authentication + # Required for: VS Code Gemini extension, Gemini CLI tools + # Location: ~/.gemini/ contains authentication credentials + # - ~/.gemini:/home/${USER:-vscode}/.gemini:cached + + # ======================================== + # Additional Personal Configurations (Optional) + # ======================================== + # You can add other personal mounts here as needed + + # Example: Additional SSH keys + # - ~/.ssh/id_custom:/home/${USER:-vscode}/.ssh/id_custom:ro + + # Example: Custom shell aliases + # - ~/.bash_aliases:/home/${USER:-vscode}/.bash_aliases:ro diff --git a/.gitignore b/.gitignore index 6d03b1d..d97c4d4 100755 --- a/.gitignore +++ b/.gitignore @@ -196,4 +196,6 @@ logs/ Pipfile.lock # Ignore installed packages from vcpkg -packages/ \ No newline at end of file +packages/ +# DevContainer override files +.devcontainer/docker-compose.override.yml From 6706f95e757f21442a348cf03148de27bf9bd3c5 Mon Sep 17 00:00:00 2001 From: brettheap Date: Sat, 27 Dec 2025 01:27:30 -0400 Subject: [PATCH 3/4] docs: align cppBench with layered images --- .devcontainer/BUILD_FIXES.md | 6 +- README.md | 373 ++++++++++++++++++++++++++++++++++- 2 files changed, 376 insertions(+), 3 deletions(-) diff --git a/.devcontainer/BUILD_FIXES.md b/.devcontainer/BUILD_FIXES.md index c84f171..64ff34f 100755 --- a/.devcontainer/BUILD_FIXES.md +++ b/.devcontainer/BUILD_FIXES.md @@ -1,4 +1,6 @@ -# C++ Development Environment - Build Fixes and Troubleshooting +# C++ Development Environment - Build Fixes and Troubleshooting (Legacy) + +This document applies to the **legacy monolithic .devcontainer** build and is deprecated. The current standard is the layered image system (`workbench-base` → `devbench-base` → `cpp-bench`). Keep this for historical reference only. This document contains common build issues and their solutions for the C++ Heavy Development Environment. @@ -246,4 +248,4 @@ readelf -h your_binary # Check ELF header htop # System resource monitor valgrind --tool=massif # Memory profiler gprof # Performance profiler -``` \ No newline at end of file +``` diff --git a/README.md b/README.md index b439deb..3c377d1 100755 --- a/README.md +++ b/README.md @@ -1 +1,372 @@ -# cppBench +# cppBench - Heavy C++ Development Environment + +A comprehensive, containerized C++ development environment designed for serious C++ development with modern toolchains, package managers, and debugging tools. + +## 🧱 Container Architecture (Layered) + +cppBench follows the layered workBenches model: +- **Layer 0**: `workbench-base:{user}` +- **Layer 1a**: `devbench-base:{user}` +- **Layer 2**: `cpp-bench:{user}` (bench-specific tools) + +### Legacy Note +The `.devcontainer/` directory in this repo is a **legacy monolithic setup** and is deprecated. The layered images are the source of truth going forward. + +## 🚀 Features + +### Compilers & Standards +- **GCC 12** - Latest stable GNU Compiler Collection +- **Clang 15** - Modern LLVM-based compiler with advanced diagnostics +- **C++20 Support** - Full support for the latest C++ standard +- **Multiple Standards** - C++11, C++14, C++17, C++20 support + +### Build Systems +- **CMake 3.16+** - Modern build system generator +- **Ninja** - Fast, parallel build system +- **Make** - Traditional build system +- **Autotools** - Configure, make, install workflow + +### Package Management +- **vcpkg** - Microsoft's C++ package manager +- **Conan 2.0** - Modern C++ package manager +- **System Packages** - Pre-installed development libraries + +### Debugging & Profiling +- **GDB** - GNU Debugger with container debugging support +- **Valgrind** - Memory debugging and profiling suite +- **AddressSanitizer (ASan)** - Fast memory error detector +- **ThreadSanitizer (TSan)** - Data race detector +- **Strace/Ltrace** - System and library call tracers + +### Static Analysis +- **Clang-Tidy** - Clang-based C++ linter +- **Clang-Format** - Code formatter +- **CppCheck** - Static analysis tool +- **Vera++** - Source code analyzer + +### Testing Framework +- **Google Test (GTest)** - Unit testing framework +- **Google Mock (GMock)** - Mocking framework +- **CTest** - CMake integrated testing + +### Development Tools +- **VS Code Extensions** - Full C++ development suite +- **Git & Git LFS** - Version control +- **Doxygen** - Documentation generation +- **Python 3** - Scripting and tool support + +## 📁 Project Structure + +``` +cppBench/ +├── .devcontainer/ # Legacy monolithic devcontainer (deprecated) +│ ├── Dockerfile # Legacy container definition +│ ├── devcontainer.json # VS Code devcontainer settings +│ ├── docker-compose.yml # Multi-container orchestration +│ ├── post-create.sh # Post-creation setup script +│ ├── BUILD_FIXES.md # Troubleshooting guide +│ ├── .env # Environment variables +│ └── .env.example # Environment template +├── scripts/ +│ ├── launch-devbench.sh # Quick VS Code launcher (Linux/macOS) +│ ├── start-monster.ps1 # PowerShell launcher (Windows) +│ └── start-monster.sh # Advanced shell launcher +├── .gitignore # Comprehensive C++ gitignore +└── README.md # This file +``` + +## 🚀 Getting Started + +### Prerequisites + +- **Docker Desktop** - For containerization +- **VS Code** - With Dev Containers extension (recommended) +- **Git** - For version control + +### Quick Launch + +#### Option 1: VS Code (Recommended) +```bash +# Clone and launch +git clone +cd cppBench +./scripts/launch-devbench.sh +``` + +#### Option 2: Shell Access +```bash +# Launch with direct shell access +./scripts/start-monster.sh --shell + +# Or rebuild and launch +./scripts/start-monster.sh --rebuild --shell +``` + +#### Option 3: Windows PowerShell +```powershell +# Launch from PowerShell +.\scripts\start-monster.ps1 + +# Rebuild and launch +.\scripts\start-monster.ps1 -Rebuild +``` + +### First Run + +1. **Image Build** - Build the layered images if they are missing +2. **VS Code Integration** - Extensions will install automatically +3. **Sample Project** - Ready-to-use C++20 sample project included +4. **Environment Setup** - All tools pre-configured and ready + +## 📚 Sample Project + +A complete sample project is included to demonstrate the environment: + +```bash +# Navigate to sample project +cd /workspace/projects/sample-cpp + +# Build and test +./build.sh + +# Run the application +../builds/sample-cpp/sample_app + +# Run tests +../builds/sample-cpp/sample_tests +``` + +### Sample Project Features +- **Modern C++20** syntax and features +- **CMake build system** with multiple targets +- **Google Test** unit tests +- **Clang-Format** configuration +- **Header/source separation** +- **Namespace organization** + +## 🔧 Development Workflow + +### Building Projects + +#### CMake (Recommended) +```bash +mkdir build && cd build +cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake --build . --parallel $(nproc) +``` + +#### With Ninja (Faster) +```bash +mkdir build && cd build +cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug +ninja +``` + +### Testing + +#### Running Tests +```bash +# With CTest +ctest --output-on-failure + +# Direct execution +./your_test_executable +``` + +#### Debugging Tests +```bash +gdb ./your_test_executable +(gdb) run +``` + +### Package Management + +#### vcpkg +```bash +# Search for packages +vcpkg search boost + +# Install packages +vcpkg install boost-system boost-filesystem + +# In CMakeLists.txt +find_package(Boost REQUIRED COMPONENTS system filesystem) +``` + +#### Conan +```bash +# Create conanfile.txt +[requires] +boost/1.82.0 + +[generators] +CMakeDeps + +# Install dependencies +conan install . --build=missing +``` + +### Debugging + +#### GDB +```bash +gdb ./your_program +(gdb) set args arg1 arg2 +(gdb) break main +(gdb) run +``` + +#### Valgrind +```bash +# Memory check +valgrind --tool=memcheck --leak-check=full ./your_program + +# Performance profiling +valgrind --tool=callgrind ./your_program +``` + +#### AddressSanitizer +```bash +# Compile with ASan +cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" +./your_program +``` + +### Static Analysis + +#### Clang-Tidy +```bash +# Generate compile_commands.json +cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + +# Run analysis +clang-tidy src/*.cpp +``` + +#### CppCheck +```bash +cppcheck --enable=all --std=c++20 src/ +``` + +## 🔍 Advanced Features + +### Multiple Compiler Testing +```bash +# Switch to Clang +export CC=clang-15 +export CXX=clang++-15 +cmake .. -DCMAKE_BUILD_TYPE=Debug + +# Switch back to GCC +export CC=gcc-12 +export CXX=g++-12 +``` + +### Cross-Platform Development +The environment supports development for multiple platforms with consistent tooling across Linux, macOS, and Windows hosts. + +### Performance Optimization +- **Link Time Optimization (LTO)** +- **Profile Guided Optimization (PGO)** +- **Parallel compilation** with optimal core usage +- **Ninja generator** for fastest builds + +## 🐛 Troubleshooting + +### Common Issues + +1. **Container build fails**: Check Docker resources and network connectivity +2. **VS Code connection issues**: Rebuild container or restart VS Code +3. **Compilation errors**: See `.devcontainer/BUILD_FIXES.md` +4. **Permission issues**: Container runs as `vscode` user with sudo access + +### Debug Information +```bash +# Check compiler versions +gcc --version +clang --version + +# Check CMake version +cmake --version + +# Check available tools +which gdb valgrind clang-tidy cppcheck + +# Check environment +echo $CC $CXX +printenv | grep -E "(VCPKG|CONAN)" +``` + +### Getting Help + +1. **BUILD_FIXES.md** - Comprehensive troubleshooting guide +2. **Container logs** - Check Docker logs for container issues +3. **VS Code Dev Containers** - Extension documentation +4. **Tool documentation** - Each tool has extensive online docs + +## 🚀 Performance Characteristics + +### Build Performance +- **Parallel compilation** utilizing all available cores +- **Ninja generator** for optimal build dependency tracking +- **ccache integration** for incremental builds (optional) +- **Precompiled headers** support + +### Container Resources +- **Base Image**: Ubuntu 22.04 LTS +- **Container Size**: ~4-6 GB (includes all tools) +- **Memory Usage**: 2-8 GB depending on workload +- **CPU Usage**: Optimized for multi-core development + +## 📈 What's Included + +### Compilers +- GCC 12.x (default) +- Clang 15.x with LLVM tools +- Support for C++11 through C++20 + +### Libraries (Pre-installed) +- Boost libraries +- OpenSSL development headers +- cURL development libraries +- Eigen3 mathematical library +- Google Test and Google Mock + +### Tools +- Git with LFS support +- CMake 3.16+ +- Ninja build system +- pkg-config +- Autotools suite +- Python 3 with pip + +### Development Environment +- VS Code optimized settings +- IntelliSense configuration +- Debugging configurations +- Code formatting rules +- Extension recommendations + +## 🔒 Security Features + +- **Non-root user** execution (vscode user) +- **Sudo access** for system administration when needed +- **Container isolation** from host system +- **Secure defaults** for all development tools + +## 📝 Contributing + +This development environment is designed to be extensible. To add new tools or modify configurations: + +1. **Dockerfile** - Add system packages and tools +2. **devcontainer.json** - VS Code settings and extensions +3. **post-create.sh** - Additional setup steps +4. **BUILD_FIXES.md** - Document new troubleshooting steps + +## 📄 License + +This development environment configuration is provided as-is for development use. + +--- + +**Ready for heavy C++ development!** 🛠️⚡🚀 From a73cfea7c3bfe19ceab66f5377a32c9aff587e1e Mon Sep 17 00:00:00 2001 From: brettheap Date: Sun, 25 Jan 2026 19:56:07 -0400 Subject: [PATCH 4/4] Update docker-compose override and gitignore Co-Authored-By: Warp --- .../docker-compose.override.example.yml | 25 +++++++++++++++++++ .gitignore | 4 +-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.devcontainer/docker-compose.override.example.yml b/.devcontainer/docker-compose.override.example.yml index 170e45a..da484a1 100644 --- a/.devcontainer/docker-compose.override.example.yml +++ b/.devcontainer/docker-compose.override.example.yml @@ -40,6 +40,31 @@ services: # Location: ~/.gemini/ contains authentication credentials # - ~/.gemini:/home/${USER:-vscode}/.gemini:cached + # ======================================== + # Shell & Terminal Configurations (Optional) + # ======================================== + # Uncomment to use your personal shell config inside the container + + # Zsh configuration + # - ~/.zshrc:/home/${USER:-vscode}/.zshrc:ro + # - ~/.oh-my-zsh:/home/${USER:-vscode}/.oh-my-zsh:ro + # - ~/.p10k.zsh:/home/${USER:-vscode}/.p10k.zsh:ro + + # Bash configuration + # - ~/.bashrc:/home/${USER:-vscode}/.bashrc:ro + + # ======================================== + # SSH Keys & Configuration (Optional) + # ======================================== + # Uncomment the SSH keys you have configured + + # - ~/.ssh/config:/home/${USER:-vscode}/.ssh/config:ro + # - ~/.ssh/id_ed25519:/home/${USER:-vscode}/.ssh/id_ed25519:ro + # - ~/.ssh/id_ed25519.pub:/home/${USER:-vscode}/.ssh/id_ed25519.pub:ro + # - ~/.ssh/id_rsa_ado:/home/${USER:-vscode}/.ssh/id_rsa_ado:ro + # - ~/.ssh/id_rsa_ado.pub:/home/${USER:-vscode}/.ssh/id_rsa_ado.pub:ro + # - ~/.ssh/known_hosts:/home/${USER:-vscode}/.ssh/known_hosts:ro + # ======================================== # Additional Personal Configurations (Optional) # ======================================== diff --git a/.gitignore b/.gitignore index d97c4d4..6d03b1d 100755 --- a/.gitignore +++ b/.gitignore @@ -196,6 +196,4 @@ logs/ Pipfile.lock # Ignore installed packages from vcpkg -packages/ -# DevContainer override files -.devcontainer/docker-compose.override.yml +packages/ \ No newline at end of file