Skip to content

Support mint #859

Open
Open
@parasyte

Description

@parasyte

I searched existing issues for mentions of mint and only found #594 and #810.

glam is used internally which is kind of nice, but I find myself wishing I could take advantage of it more often than not. Today I nearly wrote my own trait to clamp a Vector3. If mint support was available, I could use that to do the clamping et al. with glam or any other crate I prefer.

(In the end, I decided to normalize and scale the vector after checking its length squared. But I think having the option to use mint might still be useful in other situations.)

Potential drawbacks and alternatives

As mentioned in #810, using mint as a public export will increase the MSRV to 1.52.1 (It is currently 1.51 as of #833.)

An alternative to mint would be making Vector3::glam and friends public at the cost of also increasing the MSRV to 1.52.1 without the direct benefits of mint. Implementing Deref to and from the glam types would be practically the same thing with just a different interface.

Either of these will also re-raise the concern from #594 of requiring version bumps for the public crate exports.

Another alternative would be writing a whole bunch of instance methods on the core types to bring its feature set closer to glam. This would be a divergence from the Godot API for these classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: coreComponent: core (mod core_types, object, log, init, ...)featureAdds functionality to the librarygood first issue

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions