diff --git a/content/learn/migration-guides/0.10-0.11/_index.md b/content/learn/migration-guides/0.10-0.11/_index.md new file mode 100644 index 0000000000..c02aee1be4 --- /dev/null +++ b/content/learn/migration-guides/0.10-0.11/_index.md @@ -0,0 +1,1133 @@ ++++ +title = "0.10 to 0.11" +weight = 2 +sort_by = "weight" +template = "docs-section.html" +page_template = "docs-section.html" +insert_anchor_links = "right" +[extra] +long_title = "Migration Guide: 0.10 to 0.11" ++++ + +Bevy relies heavily on improvements in the Rust language and compiler. +As a result, the Minimum Supported Rust Version (MSRV) is "the latest stable release" of Rust. +
+ +### [Schedule-First: the new and improved add_systems](https://github.com/bevyengine/bevy/pull/8079) + +
+
ECS
+
+ +We have [unified adding systems to schedules under a single API](https://github.com/bevyengine/bevy/pull/8079)! `add_systems` now accepts a `ScheduleLabel` as the first parameter. `app.add_system`, `app.add_startup_system`, `app.add_startup_systems`, `system.on_startup()`, and `system.in_schedule()` have been deprecated in favor of the unified `app.add_systems` API. + +“base sets” have been removed entirely in favor of Schedules. The built in `CoreSet` and `StartupSet` base sets have been replaced with top level schedules. (ex: `CoreSet::Update` is now the `Update` schedule). + +This removes a ton of redundant APIs, removes implicit defaults entirely, and clears up a lot of the confusion introduced by base sets. We believe the consistency and ergonomics of the new `add_systems` API speaks for itself: + +```rust +// 0.10 +app.add_system(a) +// 0.11 +app.add_systems(Update, a) + +// 0.10 +app.add_systems((a, b).in_schedule(CoreSchedule::Startup)) +// 0.11 +app.add_systems(Startup, (a, b)) + +// 0.10 +app.add_systems((a, b).in_schedule(CoreSchedule::Startup).in_base_set(StartupSet::PreStartup)) +// 0.11 +app.add_systems(PreStartup, (a, b)) + +// 0.10 +app.add_startup_systems((a, b)) +// 0.11 +app.add_systems(Startup, (a, b)) + +// 0.10 +app.add_systems((a, b).on_startup()) +// 0.11 +app.add_systems(Startup, (a, b)) + +// 0.10 +app.add_systems((c, d, e)) +// 0.11 (Update is no longer implied by default) +app.add_systems(Update, (c, d, e)) + +// 0.10 +app.add_systems((f, g).in_schedule(CoreSchedule::FixedUpdate)) +// 0.11 +app.add_systems(FixedUpdate, (f, g)) + +// 0.10 +app.add_systems(h.in_base_set(CoreSet::PostUpdate)) +// 0.11 +app.add_systems(PostUpdate, h) + +// 0.10 +app.add_systems(enter_menu.in_schedule(OnEnter(AppState::Menu))) +// 0.11 +app.add_systems(OnEnter(AppState::Menu), enter_menu) + +// 0.10 +app.add_systems(exit_menu.in_schedule(OnExit(AppState::Menu))) +// 0.11 +app.add_systems(OnExit(AppState::Menu), exit_menu) + +// 0.10 +render_app.add_systems((a, b).in_set(RenderSet::Queue)) +// 0.11 +render_app.add_systems(Render, (a, b).in_set(RenderSet::Queue)) +``` + +Set configuration now also accepts a schedule: + +```rust +// 0.10 +app.configure_set(A.in_schedule(PostUpdate).after(B)) +// 0.11 +app.configure_set(PostUpdate, A.after(B)) + +// 0.10 +app.configure_set(A.after(B)) +// 0.11 (Update is no longer implied by default) +app.configure_set(Update, A.after(B)) + +// 0.10 +app.configure_sets((A, B).in_schedule(PostUpdate).after(C)) +// 0.11 +app.configure_sets(PostUpdate, (A, B).after(C)) + +// 0.10 +app.configure_sets((A, B).after(C)) +// 0.11 (Update is no longer implied by default) +app.configure_sets(Update, (A, B).after(C)) +``` + +### [bevy_audio: ECS-based API redesign](https://github.com/bevyengine/bevy/pull/8424) + +
+
Audio
+
+ +```rust +// 0.10 + +/// Need to store handles somewhere +#[derive(Resource)] +struct MyMusic { + sink: Handle, +} + +fn play_music( + asset_server: Res, + audio: Res
diff --git a/content/learn/migration-guides/0.4-0.5/_index.md b/content/learn/migration-guides/0.4-0.5/_index.md index 035d830e1b..2e4b35b69a 100644 --- a/content/learn/migration-guides/0.4-0.5/_index.md +++ b/content/learn/migration-guides/0.4-0.5/_index.md @@ -1,6 +1,6 @@ +++ title = "0.4 to 0.5" -weight = 7 +weight = 8 template = "docs-section.html" insert_anchor_links = "right" aliases = ["learn/book/migration-guides/0.4-0.5"] @@ -64,11 +64,11 @@ Similarly, rather than using `with(some_component)` to spawn an object with mult // 0.4 commands.spawn(some_bundle) .with(some_component); - + // 0.5 commands.spawn_bundle(some_bundle) .insert(some_component); - + // or... commands.spawn() .insert_bundle(some_bundle) diff --git a/content/learn/migration-guides/0.5-0.6/_index.md b/content/learn/migration-guides/0.5-0.6/_index.md index 885834524a..8855f26f60 100644 --- a/content/learn/migration-guides/0.5-0.6/_index.md +++ b/content/learn/migration-guides/0.5-0.6/_index.md @@ -1,6 +1,6 @@ +++ title = "0.5 to 0.6" -weight = 6 +weight = 7 template = "docs-section.html" insert_anchor_links = "right" aliases = ["learn/book/migration-guides/0.5-0.6"] diff --git a/content/learn/migration-guides/0.6-0.7/_index.md b/content/learn/migration-guides/0.6-0.7/_index.md index d3be72d6be..464f5c962d 100644 --- a/content/learn/migration-guides/0.6-0.7/_index.md +++ b/content/learn/migration-guides/0.6-0.7/_index.md @@ -1,6 +1,6 @@ +++ title = "0.6 to 0.7" -weight = 5 +weight = 6 template = "docs-section.html" insert_anchor_links = "right" aliases = ["learn/book/migration-guides/0.6-0.7"] diff --git a/content/learn/migration-guides/0.7-0.8/_index.md b/content/learn/migration-guides/0.7-0.8/_index.md index 4100c78b71..bfd0479610 100644 --- a/content/learn/migration-guides/0.7-0.8/_index.md +++ b/content/learn/migration-guides/0.7-0.8/_index.md @@ -1,6 +1,6 @@ +++ title = "0.7 to 0.8" -weight = 4 +weight = 5 template = "docs-section.html" insert_anchor_links = "right" aliases = ["learn/book/migration-guides/0.7-0.8"] diff --git a/content/learn/migration-guides/0.8-0.9/_index.md b/content/learn/migration-guides/0.8-0.9/_index.md index 6df1de3183..21d11d1f46 100644 --- a/content/learn/migration-guides/0.8-0.9/_index.md +++ b/content/learn/migration-guides/0.8-0.9/_index.md @@ -1,6 +1,6 @@ +++ title = "0.8 to 0.9" -weight = 3 +weight = 4 template = "docs-section.html" insert_anchor_links = "right" aliases = ["learn/book/migration-guides/0.8-0.9"] diff --git a/content/learn/migration-guides/0.9-0.10/_index.md b/content/learn/migration-guides/0.9-0.10/_index.md index d97a89a280..4bb052e4b2 100644 --- a/content/learn/migration-guides/0.9-0.10/_index.md +++ b/content/learn/migration-guides/0.9-0.10/_index.md @@ -1,6 +1,6 @@ +++ title = "0.9 to 0.10" -weight = 2 +weight = 3 template = "docs-section.html" insert_anchor_links = "right" aliases = ["learn/book/migration-guides/0.9-0.10"] diff --git a/generate-release/src/markdown.rs b/generate-release/src/markdown.rs index 1252659f94..9628368ef2 100644 --- a/generate-release/src/markdown.rs +++ b/generate-release/src/markdown.rs @@ -101,6 +101,7 @@ fn write_markdown_event( Event::Start(Tag::CodeBlock(CodeBlockKind::Indented)) => writeln!(output, "\n```",)?, Event::End(Tag::CodeBlock(CodeBlockKind::Indented)) => writeln!(output, "```")?, Event::Start(Tag::Emphasis) | Event::End(Tag::Emphasis) => write!(output, "_")?, + Event::Start(Tag::Strong) | Event::End(Tag::Strong) => write!(output, "**",)?, Event::Start(Tag::Heading(_, _, _)) => { // A few guides used headings for emphasis, // since we use headings for the actual header of the guide, we need to use a different way to convey emphasis