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

Add portable-atomic Feature #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bushrat011899
Copy link

Objective

Description

Added portable-atomic feature, which brings in portable-atomic and portable-atomic-util as a compatibility shim for Arc support on atomically challenged platforms, such as thumbv6m-none-eabi.

Testing

  • cargo check --no-default-features --target thumbv6m-none-eabi --features portable-atomic,portable-atomic/fallback,portable-atomic/critical-section

Notes

This is my first attempt at contributing to this project. Please let me know if there's anything I can do to assist with reviewing this change!

@bushrat011899
Copy link
Author

CI issue is caused by enabling all features for testing, which enables the portable-atomic compatibility support. I'm unsure how this project would like to handle this kind of issue.

github-merge-queue bot pushed a commit to bevyengine/bevy that referenced this pull request Dec 29, 2024
# Objective

- Contributes to #15460

## Solution

- Added the following features:
  - `std` (default)
  - `smol_str` (default)
  - `portable-atomic`
  - `critical-section`
  - `libm`
- Fixed an existing issue where `bevy_reflect` wasn't properly feature
gated.

## Testing

- CI

## Notes

- There were some minor issues with `bevy_math` and `bevy_ecs` noticed
in this PR which I have also resolved here. I can split these out if
desired, but I've left them here for now as they're very small changes
and I don't consider this PR itself to be very controversial.
- `libm`, `portable-atomic`, and `critical-section` are shortcuts to
enable the relevant features in dependencies, making the usage of this
crate on atomically challenged platforms possible and simpler.
- `smol_str` is gated as it doesn't support atomically challenged
platforms (e.g., Raspberry Pi Pico). I have an issue and a
[PR](rust-analyzer/smol_str#91) to discuss this
upstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support for thumbv6m-none-eabi via portable-atomic
1 participant