Skip to content

Conversation

andy1li
Copy link
Member

@andy1li andy1li commented Sep 10, 2025

No description provided.

- Changed minimum Zig version from 0.14.0 to 0.15.1 in build.zig.zon files.
- Updated build configuration in build.zig files to use `createModule` instead of `addExecutable`.
- Updated Codecrafters configuration to reflect the new Zig version.
- Adjusted README and config files to require Zig 0.15.
@andy1li andy1li self-assigned this Sep 10, 2025
Copy link

linear bot commented Sep 10, 2025

@andy1li andy1li merged commit 57ffa0b into main Sep 10, 2025
24 checks passed
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = b.graph.host,
}),
Copy link

Choose a reason for hiding this comment

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

Bug: Zig 0.15 Migration Loses Build Options

During the Zig 0.15 migration, the addExecutable configuration no longer exposes standard build options for target and optimization. This removes the ability to specify cross-compilation targets (now hardcoded to the host) and control optimization levels via zig build command-line flags, preventing optimized and cross-compiled builds.

Additional Locations (2)

Fix in Cursor Fix in Web

.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = b.graph.host,
}),
Copy link

Choose a reason for hiding this comment

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

Bug: Build Configuration Loses Cross-Compilation Flexibility

The build configuration no longer supports cross-compilation or user-defined optimization levels. The target is hardcoded to the host system, and the optimize option has been removed. This prevents users from building for different architectures or specifying optimization flags.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

1 participant