Skip to main content
Thank you for your interest in contributing to Draconis++! This guide will help you get started with development and understand our contribution workflow.

Prerequisites

Before you begin, ensure you have the following installed:
  • C++26 compiler - Clang 17+, GCC 13+, or MSVC 19.36+
  • Meson (1.1+) and Ninja - Build system
  • just (optional) - Command runner for simplified build commands

Getting started

1

Fork and clone the repository

Fork the Draconis++ repository on GitHub and clone your fork locally:
git clone https://github.com/your-username/draconisplusplus.git
cd draconisplusplus
2

Configure the build

Set up the build directory using either just or meson directly:
# Using just (recommended)
just setup

# Using Meson directly
meson setup build
3

Build the project

Compile the project:
# Using just
just build

# Using Meson directly
meson compile -C build
4

Run tests

Verify everything works by running the test suite:
# Using just
just test

# Using Meson directly
meson test -C build
5

Make your changes

Create a new branch for your feature or fix:
git checkout -b feature/my-new-feature
Make your changes following the code style guidelines.
6

Format your code

Format your code using clang-format before committing:
just format
7

Submit a pull request

Push your changes and create a pull request on GitHub with a descriptive title and description.

Build configuration options

You can customize the build by setting various options:
OptionTypeDefaultDescription
weatherfeatureenabledWeather data fetching
nowplayingfeatureenabledNow playing media info
packagecountfeatureenabledPackage count functionality
cachingfeatureenabledCaching system
pluginsfeatureenabledPlugin support
precompiled_configboolfalseUse compile-time configuration
To configure options:
# Using just
just configure -Dweather=disabled -Dplugins=enabled

# Using Meson directly
meson setup build --reconfigure -Dweather=disabled

Common build commands

# Build with verbose output
just build-verbose

# Build in release mode
just release

# Run the binary
just run

# Run with arguments
just run-args --help

# Run tests with verbose output
just test-verbose

# Run a specific test
just test-one test_name

# Clean build artifacts
just clean

# Clean and rebuild
just rebuild

# Show build configuration
just info

Project architecture

Draconis++ follows a layered architecture:

include/Drac++/ - Public API

Headers exposed to consumers of the library. These define the stable interface.
  • Core/ - System data structures (System.hpp, Package.hpp)
  • Services/ - Service interfaces for external data (weather, packages)
  • Utils/ - Type aliases, error handling, macros

src/Lib/ - Library implementation

The core library containing all platform-agnostic and platform-specific code.
  • Core/ - Cross-platform implementations
  • OS/ - Platform-specific code (Windows, Linux, macOS, BSD, etc.)
  • Services/ - External service integrations
  • Wrappers/ - Thin wrappers around third-party libraries

src/CLI/ - Command-line interface

The user-facing application that consumes the library.
  • Config/ - TOML configuration parsing and management
  • Core/ - SystemInfo class that aggregates all system data
  • UI/ - Terminal output formatting and theming

Submitting changes

Commit messages

Use Conventional Commits format:
feat: add battery level monitoring
fix: correct memory leak in cache manager
docs: update contributing guide
refactor: simplify OS detection logic
perf: optimize string conversion on Windows

Pull request guidelines

  • Descriptive title - Clearly summarize the change
  • Reference issues - Include Fixes #123 if applicable
  • Include tests - Add tests for new functionality
  • Update documentation - Document new public APIs
  • Keep changes focused - One feature or fix per PR

Getting help

If you have questions or need help:
  • Open an issue on GitHub
  • Start a discussion in the repository
  • Check existing issues and pull requests

Next steps

Code style

Learn about naming conventions and formatting rules

Adding platforms

Add support for new operating systems

Testing

Write and run tests for your changes

Build docs developers (and LLMs) love