Skip to content

Conversation

@auhivern
Copy link
Contributor

@auhivern auhivern commented Sep 4, 2025

Added all build flags on the build script. The default configuration is kept if nothing is configured.

Whitelist/blacklist configuration of add-ons:

// Whitelist example (only system and pipeline add-ons are enabled)
const zflecs = b.dependency("zflecs", .{
    .custom_build = .whitelist,
    .toggle_system_addon = true,
    .toggle_pipeline_addon = true,
});

// Blacklist example (units add-on disabled, rest is enabled)
const zflecs = b.dependency("zflecs", .{
    .custom_build = .blacklist,
    .toggle_units_addon = true,
});

@hazeycode hazeycode requested a review from Copilot September 4, 2025 21:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive build configuration options to the zflecs build system, allowing users to customize Flecs compilation through build flags and addon selection. The system supports both whitelist and blacklist modes for addon configuration.

Key changes:

  • Replaces hardcoded constants with configurable build options accessed via build_options
  • Implements whitelist/blacklist addon configuration system with toggle options for each addon
  • Adds extensive build flags for debug modes, floating-point precision, memory optimization, and performance tuning

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/zflecs.zig Updates to use build options for constants, precision types, and debug flags instead of hardcoded values
build.zig Adds comprehensive build option system with addon management, debug modes, and configurable constants

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Srekel
Copy link
Member

Srekel commented Sep 6, 2025

Thank you! Looks useful :)

@Srekel Srekel merged commit 5598e6e into zig-gamedev:main Sep 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants