-
Notifications
You must be signed in to change notification settings - Fork 408
Add no_std Release Notes
#2029
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
Merged
alice-i-cecile
merged 2 commits into
bevyengine:main
from
bushrat011899:no_std_release_notes
Mar 28, 2025
Merged
Add no_std Release Notes
#2029
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
43 changes: 42 additions & 1 deletion
43
release-content/0.16/release-notes/17955_Add_no_std_support_to_bevy.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,45 @@ | ||
| <!-- Add `no_std` support to `bevy` --> | ||
| <!-- https://github.com/bevyengine/bevy/pull/17955 --> | ||
|
|
||
| <!-- TODO --> | ||
| Bevy now has support for `no_std` targets, allowing it to be used on a much wider range of platforms. | ||
|
|
||
| This has been functionality [discussed] going back over 4 years, but was initially dropped to avoid the added complexity managing `no_std` support can bring. | ||
| To be `no_std` compatible, your crate and _all_ of its dependencies must also be `no_std`. | ||
| Coordinating that kind of support across over a hundred dependencies was just not feasible, let alone losing accessing to Rust's standard library. | ||
|
|
||
| Since then, Rust's support for `no_std` has evolved dramatically with support for critical APIs such as [`Error`] coming in [Rust 1.81]. | ||
| Starting with tracking issue [#15460] and a [`no_std` Working Group], Bevy's various crates were individually made `no_std` compatible where possible. | ||
| To aid this effort, [`bevy_platform_support`] was developed with the goal of providing opinionated alternatives to `std` items. | ||
|
|
||
| This effort reached a substantial milestone during the development of Bevy 0.16: support for `no_std` in our main `bevy` crate. | ||
| To use Bevy on a `no_std` platform, simply disable default features and use Bevy just like any other `no_std` dependency. | ||
|
|
||
| ```toml | ||
| [dependencies] | ||
| bevy = { version = "0.16", default-features = false } | ||
| ``` | ||
|
|
||
| Note that not all of Bevy's features are compatible with `no_std` yet. | ||
| Rendering, audio, and assets are notable missing APIs that you will need to find an alternative for that's suitable for your platform. | ||
| But, Bevy's powerful [`Plugin`] system allows the community to build back support for that functionality for their particular platforms. | ||
|
|
||
| For those community members working on libraries for Bevy, we encourage you to try out `no_std` support if you can! | ||
| There's a new [`no_std` library] example which demonstrates how to make a crate that is compatible with `std` and `no_std` users, with detailed comments and advice. | ||
| During the release candidate period, quite a few libraries have successfully experimented with `no_std` support, such as [`bevy_rand`] and [`bevy_replicon`]. | ||
|
|
||
| Determining what `no_std` targets support Bevy is still a work in progress. | ||
| But early reports from users have shown Bevy working on bare-metal desktops, embedded devices, and even retro consoles such as the GameBoy Advance. | ||
|
|
||
| If you have an unusual platform you'd like to try getting Bevy working on, check out the [`#unusual-platforms`] channel on Bevy's Discord server for advice! | ||
|
|
||
| [`Error`]: https://doc.rust-lang.org/stable/core/error/trait.Error.html | ||
| [#15460]: https://github.com/bevyengine/bevy/issues/15460 | ||
| [`no_std` Working Group]: https://discord.com/channels/691052431525675048/1303128171352293410 | ||
| [`bevy_platform_support`]: https://crates.io/crates/bevy_platform_support/ | ||
| [`#unusual-platforms`]: https://discord.com/channels/691052431525675048/1284885928837517432 | ||
| [discussed]: https://github.com/bevyengine/bevy/discussions/705 | ||
| [`Plugin`]: https://docs.rs/bevy/latest/bevy/app/trait.Plugin.html | ||
| [Rust 1.81]: https://releases.rs/docs/1.81.0/#stabilized-apis | ||
| [`no_std` library]: https://github.com/bevyengine/bevy/tree/main/examples/no_std/library | ||
| [`bevy_replicon`]: https://github.com/projectharmonia/bevy_replicon/tree/bevy-0.16-dev | ||
| [`bevy_rand`]: https://github.com/Bluefinger/bevy_rand | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.