Builder¶
Delegates compilation to Platform.build() and returns structured build results.
builder ¶
Build orchestration for gen_dsp projects.
Uses the platform registry to dynamically select the appropriate build system for each platform.
BuildResult
dataclass
¶
BuildResult(
success: bool,
platform: str,
output_file: Optional[Path],
stdout: str,
stderr: str,
return_code: int,
)
Result of a build operation.
Builder ¶
Build gen_dsp projects.
Initialize builder with project directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_dir
|
Path | str
|
Path to the gen_dsp project directory. |
required |
build ¶
Build the project for the specified platform.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_platform
|
str
|
Platform name (e.g., 'pd', 'max'). |
'pd'
|
clean
|
bool
|
If True, clean before building. |
False
|
verbose
|
bool
|
If True, print build output in real-time. |
False
|
Returns:
| Type | Description |
|---|---|
BuildResult
|
BuildResult with build status and output file path. |
Raises:
| Type | Description |
|---|---|
BuildError
|
If build fails and cannot be recovered. |
ValueError
|
If platform is not recognized. |
clean ¶
Clean build artifacts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_platform
|
str
|
Platform name (e.g., 'pd', 'max'). |
'pd'
|
get_lib_name ¶
Get the lib.name from the project Makefile.
Returns:
| Type | Description |
|---|---|
Optional[str]
|
The lib.name value or None if not found. |