Skip to content

chore: update to zig 0.16.x#314

Merged
mlarouche merged 3 commits into
zigimg:masterfrom
GasInfinity-Forks:0.16.x
Apr 19, 2026
Merged

chore: update to zig 0.16.x#314
mlarouche merged 3 commits into
zigimg:masterfrom
GasInfinity-Forks:0.16.x

Conversation

@GasInfinity

@GasInfinity GasInfinity commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

I don't expect this to be merged soon, I had to update it because I myself use zigimg and already updated to 0.16.x

Also updates all the tests and they all pass.

Some notable things to note:

  • The self-hosted backend crashes when bitcasting packed structs which have 0-bit fields in them (that's why the tests are built with llvm)
  • Now pointers to any field in a packed struct are bitpointers, even if byte-aligned (affects ToMethods)
  • std.testing.refAllDeclsRecursive has been deleted
  • Almost all math functions have to use inline loops as indexing vectors at runtime is now not allowed.

Edit:

  • After the type resolution changes looks like zigimg triggers either IB or a miscompilation of tagged unions and as such some tests crash.

Edit2:

  • It seems the crashes are gone but some tests still fail due to some miscompilation (very likely) as somehow we end-up in the BMP code-path when writing a TGA.

* minimal effort to get all the tests passing
* default values of ArrayList have been removed.
* the new type-resolution changes miscompile somehow tagged unions?
* update to use unmanaged hashmap containers
* miscompilations still happen
@mlarouche

Copy link
Copy Markdown
Collaborator

If you don't mind, I'm gonna work from this branch this weekend to do the 0.16 upgrade

@mlarouche mlarouche merged commit c474a50 into zigimg:master Apr 19, 2026
0 of 3 checks passed
@GasInfinity GasInfinity deleted the 0.16.x branch April 19, 2026 23:23
@shubhamlav

shubhamlav commented Apr 23, 2026

Copy link
Copy Markdown

The self-hosted backend crashes when bitcasting packed structs which have 0-bit fields in them

So I must use LLVM when using zigimg? If so, then this should be mentioned in the README.

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.

3 participants