Chapter 12. Overview of the Waf architecture

Table of Contents

The core library
Build context instances
Overview of the Waf execution
Performance and build accuracy

The core library

Waf is based on 12 modules which constitute the core library. They are located in the directory wafadmin/. The modules located under wafadmin/Tools add support for programming languages and more tools, but are not essential for the Waf core.

Table 12.1. The core library

ModuleRole
BuildDefines the build context class, which holds the data for one build (paths, configuration data)
ConfigureContains the configuration context class, which is used for launching configuration tests, and the extension system
ConstantsProvides the constants used in the project
EnvironmentContains a dictionary class which supports a lightweight copy scheme and provides persistence services
LogsProvide a logging system
NodeContains the file system representation class
OptionsProvides a custom command-line option processing system based on optparse
RunnerContains the task execution system (threaded producer-consumer)
ScriptingConstitutes the entry point of the Waf application, use the command-line for launching the configuration, the build, etc
TaskGenProvide the task generator system, and its extension system based on method addition
TaskContains the task classes, and the task containers.
UtilsContains the support functions and classes re-used in other Waf modules


The essential classes and methods from the core library are represented on the following diagram: