Skip to content

Extract extract to bevy_extract#22852

Open
Zeophlite wants to merge 21 commits into
bevyengine:mainfrom
Zeophlite:extract-extract
Open

Extract extract to bevy_extract#22852
Zeophlite wants to merge 21 commits into
bevyengine:mainfrom
Zeophlite:extract-extract

Conversation

@Zeophlite

@Zeophlite Zeophlite commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Objective

Solution

Please review commit-by-commit (other commits are in the blocking PR):

  • 0510f0f784 - Create bevy_extract crate skeleton
  • 6d096dc365 - Move sync/extract files from bevy_render to bevy_extract
  • 9d58ae36bc - Move ExtractComponent , ExtractResource derive macros
  • 7a9141b63f - Migrate code to be compatible (fix imports, remove L = RenderApp default, add compat types in bevy_render, etc.)
  • e9d361c90f - Fix docs so links work
  • 3555e22840 - Rework docs to remove most of render from bevy_extract

Simplified by #23377

Testing

  • CI
  • cargo run --example animated_mesh

@Zeophlite
Zeophlite requested a review from atlv24 February 7, 2026 12:46
@IQuick143 IQuick143 added the A-Rendering Drawing game state to the screen label Feb 7, 2026
@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

You added a new feature but didn't update the readme. Please run cargo run -p build-templated-pages -- update features to update it, and commit the file change.

Comment thread crates/bevy_extract/src/lib.rs Outdated

@atlv24 atlv24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is skipping a few steps but its roughly the goal. We need a few preparatory steps, each of these should be its own PR:

  • The resource marker change to allow orphan rule circumvention on resource impls
  • Making ExtractPlugin take the app label (RenderApp) as generic parameter instead of hardcode
  • Making ExtractPlugin take a schedule to run and having its own internal extract schedule which handles the pre and post actions, running the user provided systemset/schedule in the middle
  • improving the macro situation to hide existing complexity of implementations
  • collapse manual implementations of extract into derive macro call or whatever
  • Introducing an AppLabel marker to Extract impls to specify that they are RenderApp extract impls and tuck it away neatly into the macro
  • Rename test terminology in extract_plugin.rs to not reference rendering
  • finally, this PR

Comment thread crates/bevy_extract/README.md
Comment thread crates/bevy_extract/README.md Outdated
Comment thread crates/bevy_extract/src/extract_component.rs Outdated
Comment thread crates/bevy_extract/src/lib.rs Outdated
Comment thread crates/bevy_extract/src/lib.rs Outdated
@alice-i-cecile alice-i-cecile added C-Code-Quality A section of code that is hard to understand or change X-Contentious There are nontrivial implications that should be thought through S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Feb 8, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Feb 9, 2026
# Objective

- Followup to #22766
- Step towards #22852

## Solution

- Add marker to `ExtractResouce`
- Pass marker to `SyncComponent`

## Testing

- `cargo run --example animated_mesh`
@cart cart added this to Rendering Feb 12, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Feb 12, 2026
@Zeophlite

Zeophlite commented Feb 21, 2026

Copy link
Copy Markdown
Contributor Author

New version, extending https://github.com/atlv24/bevy/tree/ad/extract-label ( #22855 )

cargo run --example animated_mesh works now, but at reduced DX (Need to pass RenderApp around a bunch still)

Comment thread crates/bevy_anti_alias/src/contrast_adaptive_sharpening/mod.rs Outdated
Comment thread crates/bevy_extract/src/extract_base_component.rs Outdated
@Zeophlite Zeophlite added S-Needs-Help The author needs help finishing this PR. and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Feb 21, 2026
@Zeophlite
Zeophlite requested a review from atlv24 February 21, 2026 17:56
@Zeophlite
Zeophlite marked this pull request as ready for review February 22, 2026 16:32
Comment thread crates/bevy_render/src/lib.rs Outdated
Comment thread crates/bevy_render/src/lib.rs Outdated
Comment thread crates/bevy_extract/src/extract_instances.rs Outdated
Comment thread crates/bevy_extract/src/extract_param.rs Outdated
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

You added a new example but didn't add metadata for it. Please update the root Cargo.toml file.

@Zeophlite
Zeophlite force-pushed the extract-extract branch 2 times, most recently from 151d294 to c368bdc Compare July 7, 2026 07:16
Placeholder

More skeleton

Rm extract placeholders

squash skeleton

squash skeleton

squash skeleton

cargo

Merge migration guides
@Zeophlite
Zeophlite force-pushed the extract-extract branch 3 times, most recently from 5c0621e to 5c256b7 Compare July 15, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Blocked This cannot move forward until something else changes X-Contentious There are nontrivial implications that should be thought through

Projects

Status: Needs SME Triage
Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants