Skip to content

Conversation

@nbaertsch
Copy link
Contributor

Minor changes for 0.15.2

  • ArrayHashMap.put() now requires allocator as first parameter
  • ArrayList.append() now requires allocator as first parameter

These changes are required for Zig 0.15.2 which changed the API for managed data structures to take the allocator explicitly.

- ArrayHashMap.put() now requires allocator as first parameter
- ArrayList.append() now requires allocator as first parameter

These changes are required for Zig 0.15.2 which changed the API for
managed data structures to take the allocator explicitly.
@malcolmstill
Copy link
Owner

@nbaertsch thanks for this fix. I think we may also want to bump the build.zig.zon .minimum_zig_version (https://github.com/malcolmstill/zware/blob/master/build.zig.zon#L5) to 0.15.2 whilst we're at it? Do you want to make that change too?

I also notice we don't have any tests that cover this (i.e. anything in a test that compiles fn addWasiPreopen, fn forwardArgs) hence why it was missed. Will have a think about how to include such a test (let me know if you have any ideas).

@nbaertsch
Copy link
Contributor Author

bumped version. Still getting up to speed on the codebase and WASM in general TBH but I can implement some simple unit tests in this PR prior to merge.

@nbaertsch
Copy link
Contributor Author

Not sure how you want to test fn forwardArgs, but I've added some simple unit tests for addWasiPreopen.

@nbaertsch
Copy link
Contributor Author

Skip windows test for now since zware doesn't look like it supports it today. I plan on looking into Windows compilation target in a different branch (someday soon hopefully).

@malcolmstill malcolmstill merged commit db941a4 into malcolmstill:master Dec 30, 2025
13 checks passed
@malcolmstill
Copy link
Owner

Thanks @nbaertsch!

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