Skip to content

Zig 0.16 trunk, Clay 0.15 trunk, and misc changes#22

Draft
teh-cmc wants to merge 8 commits into
johan0A:mainfrom
teh-cmc:cmc/zig16_clay15_and_some
Draft

Zig 0.16 trunk, Clay 0.15 trunk, and misc changes#22
teh-cmc wants to merge 8 commits into
johan0A:mainfrom
teh-cmc:cmc/zig16_clay15_and_some

Conversation

@teh-cmc

@teh-cmc teh-cmc commented Apr 1, 2026

Copy link
Copy Markdown

I'm just opening this for visibility since I needed to get these changes off of my computer anyway. Feel free to close / grab whatever you need / discard the rest / etc.

  • Updated for Zig 0.16 (not yet released)
  • Updated for Clay 0.15 (not yet released)
  • Bindings:
    • Expose linkage settings to end users
    • ElementId.fromSrcXXX now takes line number into account
    • ElementId.inheritedXXX to explicitly create localized IDs
    • ElementId.forkedXXX to fork the currently open ID
    • .fromSlice now assumes static IDs, always
      • This makes hashing more performant (see Clay__HashString impl) and I have never once needed a dynamic ID anyway 🤷
    • Removed textDynamic which was bit-identical to text

I did not update the examples: they're broken.

0.14:

UI()(.{
    .id = my_id,
    .layout = .{ .sizing = size, .direction = .top_to_bottom },
    .clip = .{ .horizontal = true, .vertical = true },
    .background_color = my_color,
})({
    // ...
});

0.15:

UI(.{ .id = my_id })(.{
    .layout = .{ .sizing = size, .direction = .top_to_bottom },
    .clip = .{ .horizontal = true, .vertical = true },
    .background_color = my_color,
})({
    // ...
});

Thanks for the bindings! cheers

@teh-cmc teh-cmc force-pushed the cmc/zig16_clay15_and_some branch from fe37ffc to 6cbfa31 Compare April 1, 2026 16:38
@johan0A

johan0A commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Thanks, this will be helpful.

@teh-cmc teh-cmc force-pushed the cmc/zig16_clay15_and_some branch from ab141a8 to 1c1805a Compare April 2, 2026 11:57
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