Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Zig 0.12 #26

Merged
merged 6 commits into from
Jun 3, 2024

Conversation

sandprickle
Copy link
Contributor

@sandprickle sandprickle commented May 31, 2024

Changes

  • Change non-mutated value declarations to use const, as var produces an error in Zig 0.12
  • Replace calls to a few deprecated standard library functions.
  • Update build.zig for compatibility with Zig 0.12. Use addExecutable instead of addSharedLibrary for WASM artifact.
  • Update Roc module headers

Note: Glue files have been updated, but in the future the plan is to remove these from source control and generate them locally.

@sandprickle sandprickle marked this pull request as draft May 31, 2024 00:39
build.zig Show resolved Hide resolved
@sandprickle sandprickle marked this pull request as ready for review June 3, 2024 00:20
@sandprickle
Copy link
Contributor Author

This should be ready unless we want to try to use addSharedLibrary for the WASM artifact or unless we want to wait to merge until we have a way to generate the glue files.

@@ -16,9 +16,9 @@ pub fn build(b: *std.Build) !void {

const build_roc = b.addExecutable(.{
.name = "build_roc",
.root_source_file = .{ .path = "build_roc.zig" },
.root_source_file = b.path("build_roc.zig"),
// Empty means native.

Choose a reason for hiding this comment

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

Stale comment?


lib.entry = .disabled;

Choose a reason for hiding this comment

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

Nice work

Copy link
Owner

@lukewilliamboswell lukewilliamboswell left a comment

Choose a reason for hiding this comment

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

Looks good. Works well for me!

Thank you 😍

@lukewilliamboswell lukewilliamboswell merged commit 1eb5f11 into lukewilliamboswell:main Jun 3, 2024
1 check 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.

None yet

2 participants