-
Notifications
You must be signed in to change notification settings - Fork 402
Update #15281 Release Notes for 0.15 (no_std) #1737
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 13 commits into
bevyengine:main
from
bushrat011899:0.15RNFor15281NoSTD
Oct 21, 2024
+47
−1
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5798ac7
First Draft
bushrat011899 7060f7f
Update based on Feedback
bushrat011899 fe28f63
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 2fba86c
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 468799a
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 20d71fd
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 a7de043
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 60ac936
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 68b8d92
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 47a4916
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 02aa372
Update release-content/0.15/release-notes/15281_Add_core_and_alloc_ov…
bushrat011899 e2f955d
Cut Maintainer-Specific Paragraph
bushrat011899 489ff6e
Adjusted Line Wrapping and `alloc` Transition
bushrat011899 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
48 changes: 47 additions & 1 deletion
48
release-content/0.15/release-notes/15281_Add_core_and_alloc_over_std_Lints.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,50 @@ | ||
| <!-- Add `core` and `alloc` over `std` Lints --> | ||
| <!-- https://github.com/bevyengine/bevy/pull/15281 --> | ||
|
|
||
| <!-- TODO --> | ||
| Bevy relies heavily on Rust's [standard library](https://doc.rust-lang.org/std/), making it | ||
| challenging to use on embedded, niche platforms, and even certain consoles. But what if that | ||
| _wasn't_ the case? | ||
|
|
||
| We've undertaken a new initiative to challenge the reliance on the standard | ||
| library, with the eventual goal of providing a [`no_std`](https://docs.rust-embedded.org/book/intro/no-std.html) | ||
| compatible subset of Bevy which could be used on a much wider range of platforms. | ||
|
|
||
| The first very simple step is to enable a new set of lints: | ||
|
|
||
| * [`std_instead_of_core`](https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core) | ||
| * [`std_instead_of_alloc`](https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_alloc) | ||
| * [`alloc_instead_of_core`](https://rust-lang.github.io/rust-clippy/master/index.html#alloc_instead_of_core) | ||
|
|
||
| For those unfamiliar with `no_std` Rust, the standard library, `std`, gets a lot of its functionality | ||
| from two smaller crates, [`core`](https://doc.rust-lang.org/core/) and [`alloc`](https://doc.rust-lang.org/alloc/). | ||
| The `core` crate is available on every Rust target with very few exceptions, providing the | ||
| fundamental infrastructure that the Rust language relies on, such as iterators, `Result`, and many more. | ||
| Complementing that the `alloc` crate provides access to allocation-related functionality, such as | ||
| `Vec`, `Box`, and `String`. | ||
|
|
||
| Rust's support for platforms follows a [three tiered policy](https://doc.rust-lang.org/rustc/platform-support.html), | ||
| where tier 1 is guaranteed to work and will always provide the `std` crate, and tiers 2 and 3 _may_ | ||
| have the `std` crate, but often do not. | ||
| The reason for this is some platforms simply don't support the features the `std` crate requires, | ||
| such as a filesystem, networking, or threading. | ||
|
|
||
| But why should Bevy care about these platforms? When a new platform is added to Rust, | ||
| it is often lacking tier 1 support. | ||
| Even modern consoles such as the Nintendo Switch, PlayStation 5, or Xbox Series don't have tier 1 | ||
| support due to non-disclosure agreements and platform specifics. | ||
| Adding `no_std` support to Bevy will make it easier for commercial teams developing for these | ||
| platforms to get started and stay up to date. | ||
|
|
||
| Beyond the commercially-relevant modern consoles, there is a vibrant community of embedded and retro | ||
| enthusiasts developing for platforms that may never support the standard library. | ||
| Crates such as [`agb`](https://crates.io/crates/agb) and [`psx`](https://crates.io/crates/psx) provide | ||
| support for developing games on the GameBoy Advance and PlayStation One respectively. | ||
| With `no_std` support in Bevy, users may be able to leverage the wider Rust ecosystem to run their | ||
| software on these platforms. | ||
|
|
||
| We're still a while away from true `no_std` support in Bevy, but the first few changes have already | ||
| been accepted, with many more lined up for the next release in 0.16. | ||
|
|
||
| If this work sounds interesting, check out the | ||
| [`no_std` tracking issue](https://github.com/bevyengine/bevy/issues/15460) on GitHub, where you can | ||
| find a list of pull requests, and even prototypes of Bevy running in `no_std` environments. | ||
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.