# Source layout

```text
src/helpers/      generic helpers/adapters
src/phpir/        PHP AST IR data classes and builder
src/valair/       Vala IR data classes and builder
src/valacodegen/  Vala source code generation
src/lib/          libphpefc aggregation only
src/cli/          command-line entry points only
```

Build order is controlled by the hand-written `src/meson.build`.

Important rule: keep responsibilities separated.

- `helpers/PhpAstProcessor` handles nikic AST parsing/printing only.
- `helpers/PhpSerializedBundle` handles generic bundle packing/unpacking only.
- `phpir/` maps nikic AST into project-owned PHP IR.
- `valair/` maps PHP IR into project-owned Vala IR.
- `valacodegen/` maps Vala IR into Vala text.
- `cli/` composes the stages and does file I/O.
