Skip to content

Conversation

@bushrat011899
Copy link
Contributor

Objective

With Bevy 0.16, there is the possibility of many crates gaining no_std support. Further, no_std support is desirable for crates that will be upstreamed.

Solution

  • Added lints to reduce reliance on std.
  • Switched to core::prelude instead of std::prelude using #![no_std].
  • Added std and alloc as external crates.
  • Disabled default features on serde and re-enabled features used directly by this crate.

Notes

Once Bevy 0.16 releases, no_std support should be as simple as:

  • Adding an std feature and including it in default
  • Gating the extern crate std; statement
  • Gating the ui_priority and egui_priority features on std
  • Potentially adding other support features such as libm, critical-section, and web for ease of use.

@codecov
Copy link

codecov bot commented Mar 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.74%. Comparing base (d6bcaa3) to head (f27535d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #52   +/-   ##
=======================================
  Coverage   85.74%   85.74%           
=======================================
  Files          31       31           
  Lines         996      996           
=======================================
  Hits          854      854           
  Misses        142      142           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@Shatur Shatur left a comment

Choose a reason for hiding this comment

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

That was quick 😅
Thanks!

No sure why cargo check started to fail, but I don't think it's related to the changes.

@Shatur Shatur merged commit 24117d6 into simgine:master Mar 16, 2025
6 of 7 checks passed
@bushrat011899
Copy link
Contributor Author

I've been getting fast at this! Plus this crate was already very close to no_std compatible anyway

@Shatur Shatur mentioned this pull request Apr 9, 2025
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