bevyengine / bevyengine/bevy

Add more granular features to bevy_ecs

Open
#4,981 0 comments 9 reactions 0 assignees View on GitHub
A-ECS C-Usability
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Other projects may want to depend on bevy_ecs, but cannot do so comfortably due to the inclusion of irrelevant code.

See https://github.com/DioxusLabs/taffy/issues/130 for an example.

## What solution would you like?

Add granular feature flags to bevy_ecs:

- `events`
- `systems`
- `scheduling` (depends on `systems`)

All of these would be default features.

Only core data structures (`World`, `Entity`, `Query` and so on) would be included without a feature flag.

## What alternative(s) have you considered?

Eat the longer compile times and rely on rustc to optimize away the relevant code.

Use a lighter-weight ECS like `hecs` instead.

## Additional context

This would make #3786 even more reasonable and feasible; this could simply be another feature flag.

Contributor guide

Open the contributing guide

Research direction

Start by locating the bevy_ecs crate and its feature configuration; the issue does not name a specific file or test. Compare the crate's modules with the requested events, systems, and scheduling boundaries, then verify that the flags and their defaults match the issue and that core data structures remain available without them.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.