Files
spark/dev/README.md
John Colvin 8182b4b289 dev: Simplify sparkd build instructions
Restructure in style similar to Spark and Api Server build instructions
2023-08-22 14:38:39 -04:00

6.9 KiB

C++ Intellisense for Spark on Windows (VS Code)

Steps

  1. Install the C++ extension
  2. Install the CMake extension
  3. Copy c_cpp_properties.json from this folder to $workspaceFolder/.vscode/
  4. In the VS Code Command Palette, run CMake: Select Configure Preset, then select 'spark' from the dropdown

Notes

  • Intellisense won't work for generated files/types until you build libspark

C++ Intellisense for Sparkd on Linux (VS Code)

  1. Install the CMake extension
  2. Install the Clangd extension
  3. (Optional) Install the C++ extension (needed for debugging, but intellisense should work without it).
  4. If the C++ extension is installed, disable its intellisense in your workspace settings (Clangd intellisense is better)
    "C_Cpp.intelliSenseEngine": "disabled"
    
  5. In the VS Code Command Palette, run CMake: Select Configure Preset, then select the preset you wish to build from the dropdown
    • The Clang presets may work best with the Clangd extension
    • Intellisense won't work for generated files/types until you build libspark

Build Spark on Windows

Dependencies

References

Notes

  • Run commands from the repo root dir unless otherwise noted
  1. Set up the Python virtual environment
    # Create the virtual environment
    python3 -m venv .venv
    
    # Activate the virtual environment
    .venv\bin\activate.bat
    
    # Update pip
    python -m pip install --upgrade pip
    
    # Install packages
    pip install -r requirements.txt
    
  2. Build
    • Run commands in python virtual environment
    # Configure
    cmake --preset spark
    
    # Build Debug
    cmake --build --preset spark-debug
    dotnet build spark_client.sln --configuration Debug
    
    # Build Release
    cmake --build --preset spark-release
    dotnet build spark_client.sln --configuration Release
    

Build Sparkd on Linux

Dependencies

References

Prerequisites

Notes

  • Run commands from the repo root dir unless otherwise noted
  1. Set up the Python virtual environment
    # Create the virtual environment
    python3 -m venv .venv
    
    # Activate the virtual environment
    . .venv/bin/activate
    
    # Update pip
    python -m pip install --upgrade pip
    
    # Install packages
    pip install -r requirements.txt
    
  2. Build
    • Run commands in python virtual environment
    # Configure clang debug
    cmake --preset sparkd-clang-debug
    
    # Build clang debug
    cmake --build --preset spark-clang-debug
    
    # Configure gcc release
    cmake --build --preset sparkd-gcc-release
    
    # Build gcc release
    cmake --build --preset sparkd-gcc-release
    

Build Spark Api Server on Windows

Dependencies

References

Notes

  • Run commands from the repo root dir unless otherwise noted
  1. Set up the Python Virtual Environment
    # Create the virtual environment
    python3 -m venv .venv
    
    # Activate the virtual environment
    .venv\bin\activate.bat
    
    # Update pip
    python -m pip install --upgrade pip
    
    # Install packages
    pip install -r requirements.txt
    
  2. Build
    • Run in python virtual environment
    # Configure
    cmake --preset spark-api-server-windows
    
    # Build debug
    cmake --build --preset spark-api-server-windows-debug
    dotnet build Spark.Api.Server.sln --configuration Debug
    
    # Build release
    cmake --build --preset spark-api-server-windows-release
    dotnet build Spark.Api.Server.sln --configuration Release
    

Build Spark Api Server on Linux

Dependencies

References

Prerequisites

Notes

  • Run commands from the repo root dir unless otherwise noted
  1. Set up the Python Virtual Environment
    # Create the virtual environment
    python3 -m venv .venv
    
    # Activate the virtual environment
    . .venv/bin/activate
    
    # Update pip
    python -m pip install --upgrade pip
    
    # Install packages
    pip install -r requirements.txt
    
  2. Build
    • Run in python virtual environment
    # Configure
    cmake --preset spark-api-server-linux
    
    # Build debug
    cmake --build --preset spark-api-server-linux-debug
    dotnet build Spark.Api.Server.sln --configuration Debug
    
    # Build release
    cmake --build --preset spark-api-server-linux-release
    dotnet build Spark.Api.Server.sln --configuration Release