# throwtheswitch/ceedling architecture

> Architecture diagram of the GitHub repository throwtheswitch/ceedling, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/throwtheswitch/ceedling
- Repository: https://github.com/throwtheswitch/ceedling

## Overview

##### Project type and purpose
- This is “Ceedling,” a Ruby-based, command-line build and unit-test automation tool for C projects. It orchestrates compilation, test suite builds (via Unity, CMock, CException), plugin loading, and reporting.

##### File structure
- Top‐level “bin/” holds the CLI executables (ceedling, rake tasks, wrappers).
- “lib/ceedling/” contains the core application code: configurator, task invoker, generator, runner, plugin manager, utilities (file system, path, YAML wrappers), report generators, etc.
- “plugins/” holds subdirectories for each plugin; each plugin has its own lib, config, Rakefile, assets, and examples.
- “spec/” has the RSpec suite that tests the Ruby core.
- “examples/” and “assets/” provide sample C projects and config files.
- “docs/” holds user-manual, API guides, plugin development guides, and release notes.
- Configuration files: project.yml in assets and examples, .rubocop.yml, .gitignore, Gemfile/Gemfile.lock, ceedling.gemspec, Rakefile.

##### README for additional insights
- Describes the three integrated C frameworks (Unity, CMock, CException) and plugin support.
- Highlights command-line entry (“ceedling test:all”), project configuration (YAML), plugin architecture, Docker images, and Rake-based self-tests.

##### Detail and coverage
- Every layer: entrypoint, configuration, plugin loading, build pipeline, test execution, reporting.
- Examples and spec suites as consumers of the core engine (but not part of the production build path).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "CLI Layer"
        CLI["CLI Layer\n(bin/ceedling)"]:::ruby
    end

    subgraph "Core Engine"
        subgraph "Configuration Loader"
            Configurator["configurator.rb"]:::ruby
            ConfigVal["configurator_validator.rb"]:::ruby
            ConfigBuild["configurator_builder.rb"]:::ruby
            ConfigSetup["configurator_setup.rb"]:::ruby
            ConfigMatch["config_matchinator.rb"]:::ruby
            ConfigWalk["config_walkinator.rb"]:::ruby
            Defaults["defaults.rb"]:::config
        end
        subgraph "Task Invoker / Rake Integration"
            TaskInv["task_invoker.rb"]:::ruby
            RakeWrap["rake_wrapper.rb"]:::ruby
            RakefileCore["rakefile.rb"]:::ruby
            RakeUtils["rake_utils.rb"]:::ruby
            TasksBase["tasks_base.rake"]:::ruby
            TasksTests["tasks_tests.rake"]:::ruby
            TasksRel["tasks_release.rake"]:::ruby
            TasksFS["tasks_filesystem.rake"]:::ruby
        end
        subgraph "File Finder & File System Wrapper"
            FileFind["file_finder.rb"]:::ruby
            FileFindH["file_finder_helper.rb"]:::ruby
            FSWrap["file_system_wrapper.rb"]:::ruby
            FileWrap["file_wrapper.rb"]:::ruby
        end
        subgraph "Generator & Preprocessor"
            Gen["generator.rb"]:::ruby
            GenH["generator_helper.rb"]:::ruby
            PreProc["preprocessinator.rb"]:::ruby
            PreExtr["preprocessinator_extractor.rb"]:::ruby
            PreFile["preprocessinator_file_handler.rb"]:::ruby
            PreInc["preprocessinator_includes_handler.rb"]:::ruby
        end
        subgraph "Test Runner Manager"
            TRManager["test_runner_manager.rb"]:::ruby
            TestInv["test_invoker.rb"]:::ruby
            TestInvH["test_invoker_helper.rb"]:::ruby
        end
        subgraph "Reportinator & Logging"
            Report["reportinator.rb"]:::ruby
            PlugReport["plugin_reportinator.rb"]:::ruby
            PlugReportH["plugin_reportinator_helper.rb"]:::ruby
            Verbose["verbosinator.rb"]:::ruby
        end
        PluginMgr["Plugin Manager"]:::ruby
    end

    subgraph "Plugins"
        GCOV["gcov"]:::plugin
        FFF["fff"]:::plugin
        Dependencies["dependencies"]:::plugin
    end

    subgraph "Configuration Store"
        ProjYML["project.yml"]:::config
        PluginYML["plugins/*.yml"]:::config
    end

    subgraph "Examples & Assets"
        Assets["assets"]:::config
        Examples["examples"]:::config
    end

    subgraph "External Systems"
        Shell["Shell/OS & Docker"]:::external
        CCompiler["C Compiler"]:::external
        UnityFW["Unity/CMock/CException"]:::external
    end

    subgraph "RSpec Test Suite"
        SpecDir["spec/"]:::ruby
        SpecHelper["spec_helper.rb"]:::ruby
        SpecSystem["spec/system/"]:::ruby
    end

    CLI -->|invokes| Configurator
    CLI -->|invokes| TaskInv
    CLI -->|initializes| PluginMgr
    Configurator -->|reads| ProjYML
    Configurator -->|loads defaults| Defaults
    PluginMgr -->|loads| GCOV
    PluginMgr -->|loads| FFF
    PluginMgr -->|loads| Dependencies
    TaskInv -->|executes Rake| RakeWrap
    TaskInv -->|spawns| Shell
    FileFind -->|searches files| Shell
    Gen -->|generates code| FileFind
    Gen -->|calls| CCompiler
    Gen -->|uses| UnityFW
    TRManager -->|runs tests| Shell
    TRManager -->|interfaces| UnityFW
    TRManager -->|sends results| Report
    Report -->|outputs| Shell
    SpecDir -->|tests| CLI
    SpecDir -->|tests| Configurator
    Examples -->|provides samples| Configurator

    click CLI "https://github.com/throwtheswitch/ceedling/tree/master/bin/ceedling"
    click Configurator "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/configurator.rb"
    click ConfigVal "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/configurator_validator.rb"
    click ConfigBuild "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/configurator_builder.rb"
    click ConfigSetup "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/configurator_setup.rb"
    click ConfigMatch "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/config_matchinator.rb"
    click ConfigWalk "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/config_walkinator.rb"
    click Defaults "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/defaults.rb"
    click TaskInv "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/task_invoker.rb"
    click RakeWrap "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/rake_wrapper.rb"
    click RakefileCore "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/rakefile.rb"
    click RakeUtils "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/rake_utils.rb"
    click TasksBase "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/tasks_base.rake"
    click TasksTests "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/tasks_tests.rake"
    click TasksRel "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/tasks_release.rake"
    click TasksFS "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/tasks_filesystem.rake"
    click FileFind "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/file_finder.rb"
    click FileFindH "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/file_finder_helper.rb"
    click FSWrap "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/file_system_wrapper.rb"
    click FileWrap "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/file_wrapper.rb"
    click Gen "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/generator.rb"
    click GenH "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/generator_helper.rb"
    click PreProc "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/preprocessinator.rb"
    click PreExtr "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/preprocessinator_extractor.rb"
    click PreFile "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/preprocessinator_file_handler.rb"
    click PreInc "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/preprocessinator_includes_handler.rb"
    click TRManager "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/test_runner_manager.rb"
    click TestInv "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/test_invoker.rb"
    click TestInvH "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/test_invoker_helper.rb"
    click Report "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/reportinator.rb"
    click PlugReport "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/plugin_reportinator.rb"
    click PlugReportH "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/plugin_reportinator_helper.rb"
    click Verbose "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/verbosinator.rb"
    click PluginMgr "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/plugin_manager.rb"
    click PluginMgrH "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/plugin_manager_helper.rb"
    click Plugin "https://github.com/throwtheswitch/ceedling/blob/master/lib/ceedling/plugin.rb"
    click GCOV "https://github.com/throwtheswitch/ceedling/tree/master/plugins/gcov/"
    click FFF "https://github.com/throwtheswitch/ceedling/tree/master/plugins/fff/"
    click Dependencies "https://github.com/throwtheswitch/ceedling/tree/master/plugins/dependencies/"
    click ProjYML "https://github.com/throwtheswitch/ceedling/blob/master/assets/project.yml"
    click PluginYML "https://github.com/throwtheswitch/ceedling/blob/master/plugins/*/config/*.yml"
    click Assets "https://github.com/throwtheswitch/ceedling/tree/master/assets/"
    click Examples "https://github.com/throwtheswitch/ceedling/tree/master/examples/"
    click SpecDir "https://github.com/throwtheswitch/ceedling/tree/master/spec/"
    click SpecHelper "https://github.com/throwtheswitch/ceedling/blob/master/spec/spec_helper.rb"
    click SpecSystem "https://github.com/throwtheswitch/ceedling/tree/master/spec/system/"

    classDef ruby fill:#ADD8E6,stroke:#000080
    classDef plugin fill:#FFFF99,stroke:#999900
    classDef external fill:#FFCCCC,stroke:#cc0000
    classDef config fill:#CCFFCC,stroke:#008000
```
