c++ development environment

Table of Contents

1. Introduction

This describes my personal development environment. It focuses on productive C++-oriented development.

1.1. Goals

  1. portable development environment
  2. editor with LSP support
  3. Integrate compiled c++ libraries with python and jupyter notebooks.
  4. Communicate with browser-based front ends.
  5. Reliable and composable build system. Want it to be easy to introduce new libraries, with an arbitrarily elaborate dependecy graph
  6. Reproducible builds.
    • so it's easy to transfer/replicate development environment on another host
    • to mitigate bitrot
  7. Unit tests with code coverage
  8. Continuous Integration (CI)

2. Summary

Will be using the following components

2.1. Development Stack

component solution
o/s independent package manager nix
editor emacs
document generator org-mode
compiler gcc
language server lsp + clangd
version control git
continuous integration (CI) github actions
containers docker
cloud provider digital ocean

2.2. Build Stack

component solution
c++ build cmake + custom modules
c++ unit tests ctest + catch2
c++ code coverage gcov + lcov
reproducible build nix + flakes
documentation sphinx

2.3. C++ Library Stack

using these c++ libraries

component solution
unit tests catch2
general purpose boost
python integration pybind11
c++/browser communication websocket

3. Topics

3.1. Build Stack

3.1.1. nix setup

3.1.2. emacs setup: [.emacs walkthrough]

3.1.3. org-mode: [resources]

3.1.4. c++ build (cmake)

3.1.5. c++ unit tests

3.1.6. c++ code coverage

3.1.7. reproducible build (nix + flakes)

3.1.8. continuous integration: [github + nix + docker]

3.1.9. containers (docker)

3.2. C++ Library Stack

3.2.1. catch2

3.2.2. boost

3.2.3. pybind11

3.2.4. c++/browser communication

3.2.5. publish org-mode content: [publish static html]

Author: Roland Conybeare

Created: 2024-09-08 Sun 18:01

Validate