Skip to content

Conversation

@TeamDman
Copy link

Exploring this for personal use and figured I'd upstream.
Potential caveat is that I'm targeting bevy 0.17.0-rc.1

Mainly copying

https://github.com/bevyengine/bevy/blob/8b36cca28c4ea00425e1414fd88c8b82297e2b96/crates/bevy_reflect/src/impls/smol_str.rs

haven't checked how it looks when paired with bevy world inspector plugin yet

@ParkMyCar
Copy link
Owner

Hey @TeamDman, thanks for the PR! Happy to add support for bevy but I wouldn't want to depend on a release candidate. It looks like for the last few releases it was ~1 month from RC to stable version, let's wait for stabilization and then merge?

@TeamDman
Copy link
Author

Bevy 0.17 is out, will try and get this updated soon
https://bevy.org/news/bevy-0-17/

@TeamDman TeamDman marked this pull request as ready for review October 2, 2025 04:10
Copilot AI review requested due to automatic review settings October 2, 2025 04:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds bevy-reflect feature support to CompactString, enabling integration with Bevy's reflection system. The implementation follows the pattern used by other Bevy string types and includes comprehensive test coverage.

  • Adds bevy-reflect feature flag and implementation using impl_reflect_opaque! macro
  • Creates example demonstrating CompactString usage with Bevy ECS components
  • Includes comprehensive test suite covering reflection functionality

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
compact_str/Cargo.toml Adds bevy-reflect feature flag and bevy_reflect dependency
compact_str/src/features/mod.rs Conditionally includes the new bevy_reflect module
compact_str/src/features/bevy_reflect.rs Implements Reflect trait for CompactString with comprehensive tests
examples/bevy-reflect/Cargo.toml Example project configuration with bevy dependencies
examples/bevy-reflect/src/main.rs Example demonstrating CompactString with Bevy ECS components
Cargo.toml Adds example to workspace members

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

TeamDman and others added 2 commits October 2, 2025 16:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants