Skip to content

Initial draft of upstreaming guidance#2376

Merged
alice-i-cecile merged 7 commits intobevyengine:mainfrom
alice-i-cecile:upstreaming-guidance
Apr 7, 2026
Merged

Initial draft of upstreaming guidance#2376
alice-i-cecile merged 7 commits intobevyengine:mainfrom
alice-i-cecile:upstreaming-guidance

Conversation

@alice-i-cecile
Copy link
Copy Markdown
Member

There's been a number of upstreaming initiatives at this point, some of which have gone better than others. Similarly, we've had a number of folks ask about "what about upstreaming this crate?".

Writing out the guidance lets us agree on principles / best practices in general, and helps teach folks what to think about and how they can help.

@alice-i-cecile alice-i-cecile requested a review from cart March 11, 2026 23:55
@alice-i-cecile alice-i-cecile added C-Content X-Controversial There is active debate or serious implications around merging this PR S-Needs-Review A-Contributing-Guide labels Mar 11, 2026
Comment thread content/learn/contribute/project-information/upstreaming.md Outdated
- this is particularly true for other crates which rely on `bevy`!
- have clear and helpful documentation and examples, ideally at the crate, module and API level
- offer the basic functionality expected by users trying to do the thing the crate was made to do
- have a pleasant API that feels Bevy-idiomatic
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

May be worth mentioning what qualifies something as bevy-idiomatic so that users wanting to upstream know what to aim for?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
- have a pleasant API that feels Bevy-idiomatic
- have a pleasant API that feels Bevy-idiomatic
- makes use of existing ECS primitives where possible: entities, components, resources, events...
- prefers simple patterns and avoids new abstractions
- defaults to relatively public internals
- uses enums and new-types to encode intent, rather than relying on argument names
- minimizes use of macros

Copy link
Copy Markdown
Member

@CorvusPrudens CorvusPrudens Mar 12, 2026

Choose a reason for hiding this comment

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

This could have an entire document of its own! I think what makes something "Bevy-idiomatic" is also a moving target.

Although maybe something like "APIs should be expressed in the vocabulary of Bevy's ECS" would be enough. A touch vague, but slightly more substantial.

Copy link
Copy Markdown
Member Author

@alice-i-cecile alice-i-cecile Mar 12, 2026

Choose a reason for hiding this comment

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

Yeah, I wanted to stick to some reasonably tangible and uncontroversial elements here. This one has more subjectivity than most!

That said, a lot of the most serious problems here that I've seen in various ecosystem crates aren't actually about their ECS usage at all: it's about weird idioms translated from non-Rust languages!

Comment thread content/learn/contribute/project-information/upstreaming.md Outdated
alice-i-cecile and others added 3 commits March 11, 2026 20:19
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
Comment thread content/learn/contribute/project-information/upstreaming.md
Comment thread content/learn/contribute/project-information/upstreaming.md
Comment thread content/learn/contribute/project-information/upstreaming.md
Copy link
Copy Markdown
Contributor

@Shatur Shatur left a comment

Choose a reason for hiding this comment

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

I like it!

- Bevy has no existing solution for this problem
- the scope of a game engine is large, but not infinite
- each feature must justify its value relative to the maintenance/compile time/binary size costs
- Bevy is intentionally very extensible: allowing users to
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this might be in the wrong place?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@alice-i-cecile I think this was overlooked

@viridia
Copy link
Copy Markdown
Contributor

viridia commented Mar 12, 2026

Mermaid diagram:

quadrantChart
    title Upstream decision framework
    x-axis "Not to upstream" --> "To upstream"
    y-axis "Bad reasons" --> "Good reasons"
    quadrant-1 Good reasons to upstream
    quadrant-2 Good reasons not to upstream
    quadrant-3 Bad reasons not to upstream
    quadrant-4 Bad reasons to upstream
Loading

@cart cart moved this to Focus in @cart's attention Mar 16, 2026
Comment thread content/learn/contribute/project-information/upstreaming.md Outdated
Co-authored-by: weihnaxbaum <140716472+weihnaxbaum@users.noreply.github.com>
Comment thread content/learn/contribute/project-information/upstreaming.md Outdated
Copy link
Copy Markdown
Member

@cart cart left a comment

Choose a reason for hiding this comment

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

Solid work! Just one minor point of contention :)

@alice-i-cecile alice-i-cecile requested a review from cart April 6, 2026 20:32
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 7, 2026
Merged via the queue into bevyengine:main with commit 5fce46a Apr 7, 2026
10 checks passed
@alice-i-cecile alice-i-cecile deleted the upstreaming-guidance branch April 7, 2026 03:02
@github-project-automation github-project-automation bot moved this from Focus to Done in @cart's attention Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Contributing-Guide C-Content S-Needs-Review X-Controversial There is active debate or serious implications around merging this PR

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.