News for hackers. Stuff that matters.
Re:Crabtime: Zig's Comptime in Rust by Ygg2 on Sunday March 23, 2025 @08:01AM (#43452370)
How does it do reflection on third party types (non-Rust, non-Bevy types)? Those that don't derive Reflect?

Don't coherence rules prevent it?

Re:Crabtime: Zig's Comptime in Rust by pcwalton on Sunday March 23, 2025 @12:17PM (#43453890)
Assuming by "non-Rust types" you mean "those that the bevy_reflect crate doesn't know about", it's indeed limited by the orphan rule. That being said, bevy_reflect offers many workarounds for this problem. Because bevy_reflect is based on a type registry containing function pointers, you can actually populate it manually for types external to your crate without using the Reflect trait at all if you want to. And if your type contains fields that aren't Reflect, then you can use custom reflection logic.
Re:Crabtime: Zig's Comptime in Rust by Ygg2 on Monday March 24, 2025 @05:22AM (#43458869)
non-Rust meaning non-std types, for which Bevy reflect can do manual trait implementation.