Skip to content

Initial draft of upstreaming guidance#2376

Open
alice-i-cecile wants to merge 5 commits intobevyengine:mainfrom
alice-i-cecile:upstreaming-guidance
Open

Initial draft of upstreaming guidance#2376
alice-i-cecile wants to merge 5 commits intobevyengine:mainfrom
alice-i-cecile:upstreaming-guidance

Conversation

@alice-i-cecile
Copy link
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
- 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

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
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
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
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!

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>
Copy link
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!

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

None yet

Development

Successfully merging this pull request may close these issues.

7 participants