How Dagger Works
Before you design a module, learn the world it lives in.
Dagger has a simple shape:
- A workspace is the project using Dagger.
- A module adds capabilities to that workspace.
- A function is the typed action a module exposes.
- The engine runs the work as a graph.
- The cache makes repeated work fast.
- A check turns a function into project validation.
That is the core model. Everything else in the Module Developer Guide builds on it.
Learn It in This Order​
Read these pages in order:
- Workspaces: where Dagger starts.
- Modules: what a workspace installs.
- Functions: what callers run.
- Checks: how modules protect a project.
- Cache: why good modules feel fast.
- Execution: what happens under the hood.
Do not rush this. Most bad module APIs come from skipping one of these ideas.
What This Unlocks​
Once this model clicks, module design gets much easier.
- You know what belongs in workspace config.
- You know what belongs in a module API.
- You know why functions return typed objects.
- You know why checks are different from tests.
- You know how cache rewards precise inputs.
- You know why Dagger works the same locally, in CI, and in Cloud.
Start with Workspaces.