-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Currently encase has trait implementations on foreign types, there are 2 main issues with this approach:
- users of encase and X math crate must make sure to use a version of encase that depends on the same version of X math crate they list in their Cargo.toml (related: Update README.md #89)
- version bumps of math crates cause encase version bumps; this will be reversed if math crates instead host the trait implementations but so far encase's major version bumps have rarely been caused by braking changes in encase's API (this happened only in v0.2 & v0.3)
To make the transition as smooth as possible:
I have done an analysis of crates that depend on encase and features they use and found out that only glam and nalgebra features are used.
Crate list and encase features they use
| crate name | encase feature |
|---|---|
| bevy_color | |
| bevy_egui | |
| bevy_render | glam |
| bottomless-pit | |
| dexterior-visuals | nalgebra |
| easy-wgpu | nalgebra |
| fragmentcolor | |
| glamour | |
| gloss-renderer | nalgebra |
| include-wgsl-oil | |
| inox2d-wgpu | glam |
| sdf2mesh | |
| shute | |
| spright | glam |
| wgcore | nalgebra |
| wgparry2d | nalgebra |
| wgparry3d | nalgebra |
| wgrapier2d | nalgebra |
| wgrapier3d | nalgebra |
| wgsl-inline | |
| xc3_wgpu | glam |
based on https://crates.io/crates/encase/reverse_dependencies as of 2025-04-25
Since published crates might not be representative of all encase users, I've also done an analysis of github repositories with Cargo.tomls listing encase and X features:
Github repositories and encase features they use
Based on these findings:
- I will try to get confirmation from the
glam,nalgebraandcgmathdevelopers that they are willing to host the trait implementations behind anencasefeature. - Since the
mint,ultravioletandsmallvecfeatures only have 1/2 users I will:- contact the developers of the respective crates to let them know this is happening and if they would like to add trait implementations
- contact the users to see what the best way forward for them is
-
encasemight be removing its trait implementations on foreign types rntrtul/moviola#1 -
encasemight be removing its trait implementations on foreign types mbullington/iron-doom#1 -
encasemight be removing its trait implementations on foreign types huggingface/ratchet#269 -
encasemight be removing its trait implementations on foreign types vinhowe/piston#12
-
Once there are ways forward for users, I will release a v0.12 that includes the removal of all optional features and coordinate with the crates above to add the trait implementations behind an encase feature flag.