Skip to content

Conversation

@ricochet
Copy link

Today, WASI does not support atomics. Support for WASI in Abseil was added in #1509 and needs to be refreshed.

Note that there is a roadmap item for wasi that will give us access to atomics via the component model's cooperative threads feature. Implementations are in progress but this may take a few months and so in the mean time, we need this fix.

I created an example with the necessary stubs that are missing from upstream abseil and validated that these can be removed with the changes in this PR: https://github.com/ricochet/wasi-protobuf/blob/main/wasi-build/wasi_stubs.cpp

@google-cla
Copy link

google-cla bot commented Nov 23, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Member

@derekmauro derekmauro left a comment

Choose a reason for hiding this comment

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

It should be far simpler to achieve this. I believe all that needs to be done is a slight tweak here and everything else should just work:

// LowLevelAlloc requires that the platform support low-level
// allocation of virtual memory. Platforms lacking this cannot use
// LowLevelAlloc.
#ifdef ABSL_LOW_LEVEL_ALLOC_MISSING
#error ABSL_LOW_LEVEL_ALLOC_MISSING cannot be directly set
#elif !defined(ABSL_HAVE_MMAP) && !defined(_WIN32)
#define ABSL_LOW_LEVEL_ALLOC_MISSING 1
#endif

Signed-off-by: Bailey Hayes <[email protected]>
@ricochet
Copy link
Author

ricochet commented Dec 3, 2025

Thank you that simplified it quite a bit 👍

@ricochet ricochet requested a review from derekmauro December 3, 2025 16:42
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