PackageTrack
Sign in Get early access

glam

A simple and fast 3D math library for games and graphics

0.33.5 126M downloads/mo #705 most downloaded on crates.io bitshifter/glam-rs

What this package is like to depend on

Last release 4 days ago

19 Aug 2026

Ships fairly regularly

a new release about every 3 weeks

Nearly every release is documented

notes for 81 of 88 stable releases

2 versions withdrawn

withdrawn after publishing

7 years old

90 releases · first in 2019

15 releases in the last 12 months

see the full history below

Release timeline

90 releases · May 2019 to Aug 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 90
  1. 0.33.5 19 Aug 2026
    Release notes

    chore: Release package glam version 0.33.5

    Open source →
    Release notes

    Fixed

    • Fix remaining 32-bit layout tests and add i686 CI coveragees (#784)
    • 32-bit I64Vec3 and U64Vec3 alignment tests (#781)
    Open source →
  2. 0.33.4 18 Aug 2026
    Release notes

    chore: Release package glam version 0.33.4

    Open source →
    Release notes

    Added

    • Add serde serialize to BVec3A and BVec4A when scalar-math enabled. (#768)

    Fixed

    • ISizeVecN layout checks on 32-bit targets (#775)
    • USizeVec2 layout checks on 32-bit targets (#771)

    Changed

    • Replace scalar recip() calls with explicit division in vector implementations (#765)

    Other

    • Add release-plz support (#772)
    • normalize changelog to the release-plz format (#776)
    Open source →
  3. 0.33.3 03 Aug 2026
    Release notes

    Added

    • Added Vec3::angle_to which returns the signed angle (in radians) between two vectors around a given axis in the range [-π, +π]. The angle follows the right-hand rule around the axis and can be used with rotate_axis, e.g. self.rotate_axis(axis, self.angle_to(rhs, axis)) will be equal to rhs.

    • Added Vec2::rotate_angle which rotates a vector by an angle (in radians), equivalent to self.rotate(Vec2::from_angle(angle)).

    • Added glam_asserts that angle_to and angle_between inputs are non-zero vectors.

    Changed

    • to_array is now a const fn on all quaternion types.
    Open source →
  4. 0.33.2 28 Jun 2026
    Release notes

    Added

    • Added the camera and dcamera modules containing view and projection constructor functions organized by handedness and graphics API convention.

      The view sub-module provides look_at_* and look_to_* functions that return Mat4, Affine3, Affine3A, Mat3, Mat3A, or Quat view transforms.

      The proj sub-module provides API-specific constructors for OpenGL, DirectX and Vulkan conventions, each offering perspective, perspective_infinite, perspective_infinite_reverse, orthographic, and frustum constructors for both left-handed and right-handed view spaces.

    • Added a prelude module which re-exports all common types and traits but not camera modules.

    • Added slerp_long method to quaternion types, a spherical linear interpolation that preserves the rotation direction.

    • Added is_negative_mask method to all signed vector types which returns a boolean mask vector indicating which components have a negative sign.

    Changed

    • View and projection constructors (look_at_*, look_to_*, perspective_*, orthographic_*, frustum_*) have been moved off matrix, affine and quaternion types into the camera/dcamera modules as free functions. The existing methods on those types have been deprecated.
    Open source →
  5. 0.33.1 06 Jun 2026
    Release notes

    Changed

    • Changed vector map method constraint from Fn to FnMut, allowing closures that mutate their captured state.

    • Clarified documentation for any_orthogonal_pair method to specify it produces a right-handed basis.

    Open source →
  6. 0.33.0 21 May 2026
    Release notes

    Breaking changes

    • All types apart from f32 and bool types are now optional but enabled by default. Unused types can be disabled to improve compile times.

    • Added #[must_use] attribute to as_dmat2, as_dmat3 and as_dmat4 vector methods.

    Open source →
  7. 0.32.1 06 Mar 2026
    Release notes

    Fixed

    • Fixed the implementation of dividing a scalar value by a matrix. This was actually dividing the matrix by the scalar value, with this fix 1.0/m == m.recip() is now true.

    Added

    • Added matrix recip() method which returns a new matrix containing the reciprocal of each element of the source matrix.
    Open source →
  8. 0.32.0 11 Feb 2026
    Release notes

    Breaking changes

    • Updated the optional rand dependency to 0.10.
    Open source →
  9. 0.31.1 11 Feb 2026
    Release notes

    Added

    • Added isize vector types ISizeVec2, ISizeVec3 and ISizeVec4.

    • Added wasm64-unknown-unknown support. The wasm64-unknown-unknown target uses the same simd128 instructions as wasm32. Note that wasm64-unknown-unknown requires a nightly toolchain.

    Changed

    • The USES_WASM32_SIMD constant on vector types has been renamed to USES_WASM_SIMD, USES_WASM32_SIMD has been deprecated.
    Open source →
  10. 0.31.0 21 Jan 2026
    Release notes

    Breaking changes

    • The signature of Quat::from_affine3(&Affine3A) was changed to Quat::from_affine3(&Affine3) with the addition of the Affine3 type.

    • Removed deprecated Vec2 and DVec2 angle_between methods.

    • Consistently use &self for matrix and affine type methods and self for vector, quat and mask types.

    Added

    • Added Affine3 type.

    • Added diagonal method to matrix types which returns a vector containing the diagonal of the matrix.

    • Added mul_diagonal_scale methods to matrix types which multiply the matrix by a scale vector without needing to multiply by a scale matrix.

    • Added mul_transpose_vecn methods to matrix types which multiply the vector by the transpose of the matrix without needing to transpose it first. They can be slightly more efficient for SIMD backed types.

    • Added try_inverse method to matrix types which returns an option containing the inverted matrix or None if the matrix was not invertible.

    • Added inverse_or_zero method to matrix types which returns the inverted matrix or a zero matrix if the matrix was not invertible.

    • Added step and saturate methods to the FloatExt trait.

    • Added step, saturate, sqrt, sin, cos and sin_cos methods to float vector types.

    • Added from_rotation_axes method to quaternion types. This method was previously internal only.

    Open source →
  11. 0.30.10 07 Jan 2026
    Release notes

    Added

    • Added float vector exp2, ln and log2 methods.

    • Added convenience methods for working with homogeneous coordinates, including 3D vector from_homogeneous and to_homogeneous and 4D vector project.

    Fixed

    • Fixed rand UniformSampler new_inclusive methods so they're actually inclusive.
    Open source →
  12. 0.30.9 28 Oct 2025
    Release notes

    Added

    • Added 3D vector rotate_x, rotate_y, rotate_z and rotate_axis methods.

    • Added arbitrary feature, providing arbitrary trait implementations for glam types.

    • Added zerocopy feature, providing zerocopy trait implementations for glam types.

    Changed

    • Made the threshold used in DQuat::is_near_identity() more precise, previously it used the same threshold as Quat::is_near_identity.
    Open source →
  13. 0.30.8 24 Sep 2025
    Release notes

    Changed

    • Updates from the rust-gpu project, primarily removing the requirement to use repr(simd) on spirv.
    Open source →
  14. 0.30.7 19 Sep 2025
    Release notes

    Changed

    • Reverted change to use self in vectors and &self in vectors and matrices as this was a breaking change for some code.
    Open source →
  15. 0.30.6 18 Sep 2025 withdrawn
    Release notes

    Added

    • Added encase feature, providing encase trait implementations for glam types.

    Changed

    • Consistently use self for vector and quat methods and &self for matrix and affine methods.
    Open source →
  16. 0.30.5 26 Jul 2025
    Release notes

    Added

    • Added Vec3::to_vec3a and Vec3A::to_vec3 methods.

    Fixed

    • Fixed using bytemuck feature on spirv targets.
    Open source →
  17. 0.30.4 12 Jun 2025
    Release notes

    Added

    • Added 4x4 matrix frustum_lh, frustum_rh and frustum_rh_gl methods.

    • Added assign methods for all corresponding op trait impls (e.g. add_assign, div_assign, mul_assign, sub_assign etc.)

    • Added by reference implementations for all op trait impls.

    Changed

    • bytemuck trait implementations now use derive macros to catch potentially misuse.

    Fixed

    • Fixed unsoundness in core-simd implementation of Vec3A to [f32;3] array and Vec3A to Vec3 conversion.

    • Fixed potential unsoundness in conversion from Vec4 to (f32, f32, f32, f32) tuple conversion.

    Open source →
  18. 0.30.3 01 May 2025
    Release notes

    Added

    • Added speedy feature, implementing serialization and deserialization via the speedy crate.

    • Added fract_gl to the 'FloatExt' trait which uses the GLSL specification of fract, self - self.floor().

    Open source →
  19. 0.30.2 13 Apr 2025
    Release notes

    Added

    • Added precision conversion functions for affine types: Affine3A::as_daffine3, DAffine3::as_affine3a, Affine2::as_daffine2 and DAffine3::as_affine2

    • Added normalize_and_length method to f32 and f64 vectors.

    Changed

    • Vector min and max scalar implementations have been changed to use an if check instead of the built in Rust floating point primitive min and max methods. The Rust methods have special handling for NaN propagation however because this is not consistent between the different SIMD implementations in glam the most efficient implementation is preferred.
    Open source →
  20. 0.30.1 20 Mar 2025
    Release notes

    Added

    • Added usize vector types, USizeVec2, USizeVec3 and USizeVec4.

    • Added min_position and max_position methods for vector types, which return the index of the min or max element in the vector.

    • Added rotate_towards method to 3D vector types.

    Changed

    • Removed the small angle check from 2D vector rotate_towards implementations as it was unnecessary and would not preserve the length of the input.
    Open source →
  21. 0.30.0 18 Feb 2025
    Release notes

    Breaking changes

    • The up and dir vectors passed to affine and matrix look_to_lh and look_to_rh methods must now be normalized. This was changed to be consistent with other methods.

    • Updated the optional rand dependency to 0.9

    • Updated the optional rkyv dependency to 0.8

    Added

    • Implemented rand Uniform distribution trait for all vector types.

    • Added "swizzle assignment" support to vector swizzles, in the form of v.with_zx(ivec2(1, 2)) which will return a copy of v where the z and x components are set to 1 and 2 respectively.

    • Added Mat3 and Quat look_at_lh and look_at_rh methods.

    • Added Quat look_to_lh and look_to_rh methods.

    • Added 3D vector slerp method that performs a spherical linear interpolation between a source and a target 3D vector.

    • Added manhattan_distance, checked_manhattan_distance and chebyshev_distance methods to integer vector types which calculates the Manhattan Distance and the Chebyshev Distance between two vectors.

    • Added 4x4 matrix from_mat3_translation method to have parity with the 3D affine type.

    Fixed

    • Quat::rotate_towards() now returns the target Quat if the angle is small. Previously self was returned which could skip the rotation entirely.
    Open source →
  22. 0.29.3 31 Mar 2025

    Nothing published for this version

  23. 0.29.2 05 Nov 2024
    Release notes

    Fixed

    • Fix regression in vector write_to_slice methods where the destination had to be the same size as the input, but it should support writing to a slice that is the same size or larger than the input.
    Open source →
  24. 0.29.1 30 Oct 2024
    Release notes

    Added

    • Added i8 and u8 vector types, I8Vec2, I8Vec3, I8Vec4, U8Vec2, U8Vec3 and U8Vec4.

    • Added Mat4::project_point3a(Vec3A) method transforming points by perspective projections.

    Changed

    • Removed normalized assertions from quaternion multiplies as sometimes this is valid.

    • Include Debug and Display implementations on spirv targets.

    • Optimized vector from_slice and write_to_slice methods.

    • Improved serde error messages.

    Open source →
  25. 0.29.0 20 Aug 2024
    Release notes

    Breaking changes

    • EulerRot has been reimplemented and now has support for 24 different rotation order enum values.

    Fixed

    • Reduced the dot threshold at which quaternion slerp uses lerp to improve accuracy.

    Added

    • Added 3x3 matrix from_mat4_minor() and 2x2 matrix from_mat3_minor() methods.

    • Added bvec2, bvec3, bvec3a, bvec4 and bvec4a vector mask creation functions.

    • Added all 24 possible intrinsic and extrinsic Euler angle rotation combinations to EulerRot enum.

    • Added is_finite_mask method to vector types which returns a vector mask.

    • Added reflect and refract methods to vector types.

    • Added to_euler methods to matrix types which extracts Euler angles from a rotation matrix for a given EulerRot.

    • Added generic map method to vector types which applies a functor to all vector elements.

    • Vector arithmetic ops are now implemented on references.

    Changed

    • Vector and quaternion lerp now uses a precise lerp algorithm.
    Open source →
  26. 0.28.0 10 Jun 2024
    Release notes

    Breaking changes

    • Removed derives from glam::deref types used by Deref on SIMD vector types. These unintentionally added support for traits like PartialOrd to SIMD vector types. This may break existing code that was depending on this. Please use cmple().all() etc. instead of PartialOrd methods.

    • Removed impl From<Vec4> for Vec3A as this violated the From trait contract that conversions should be lossless. Please use the explicit Vec3A::from_vec4 method instead.

    • Renamed 2D vector angle_between to angle_to to differentiate from the 3D angle_between which has different semantics to the 2D version.

    Added

    • Added aarch64 neon support.

    • Added rotate_towards methods for 2D vectors and quaternions.

    • Added Vec3A::from_vec4 method which can perform a no-op conversion when SIMD is used. This replaces the impl From<Vec4> for Vec3A implementation.

    Open source →
  27. 0.27.0 23 Mar 2024
    Release notes

    Breaking changes

    • Changed implementation of vector fract method to match the Rust implementation instead of the GLSL implementation, that is self - self.trunc() instead of self - self.floor().

    Added

    • Added vector fract_gl which uses the GLSL specification of fract, self - self.floor().
    Open source →
  28. 0.26.0 18 Mar 2024
    Release notes

    Breaking changes

    • Minimum Supported Rust Version bumped to 1.68.2 for impl From<bool> for {f32,f64} support.

    Fixed

    • Respect precision format specifier in Display implementations. Previously it was ignored.

    • Corrected precision documentation for vector is_normalized methods and changed the internal check to use 2e-4 to better match the documented precision value of 1e-4.

    Added

    • Added with_x, with_y, etc. to vector types which returns a copy of the vector with the new component value.

    • Added midpoint method to vector types that returns the point between two points.

    • Added move_towards for float vector types.

    • Added saturating add and sub methods for signed and unsigned integer vector types.

    • Added element wise sum and product methods for vector types.

    • Added element wise absolute values method for matrix types.

    • Added from_array method for boolean vector types.

    • Added normalize_or method to vector types that returns the specified value if normalization failed.

    • Added From<BVecN> support for all vector types.

    • Added Div and DivAssign by scalar implementations to matrix types.

    Open source →
  29. 0.25.0 19 Dec 2023
    Release notes

    Breaking changes

    • Changed Vec4 to always used BVec4A as a mask type, regardless if the target architecture has SIMD support in glam. Previously this was inconsistent on different hardware like ARM. This will have a slight performance cost when SIMD is not available. Vec4 will continue to use BVec4 as a mask type when the scalar-math feature is used.

    Fixed

    • Made Affine2 implement the bytemuck::AnyBitPattern trait instead of bytemuck::Pod as it contains internal padding due to Mat2 being 16 byte aligned.

    • Updated the core-simd implementation to build on latest nightly.

    Added

    • Added to_angle method to 2D vectors.

    • Added FloatExt trait which adds lerp, inverse_lerp and remap methods to f32 and f64 types.

    • Added i16 and u16 vector types, I16Vec2, I16Vec3, I16Vec4, U16Vec2, U16Vec3 and U16Vec4.

    Changed

    • Renamed Quat::as_f64() to Quat::as_dquat() and DQuat::as_f32() to DQuat::as_quat() to be consistent with other types. The old methods have been deprecated.

    • Added the #[must_use] attribute to all pure functions following the guidelines for the Rust standard library.

    Open source →
  30. 0.24.2 23 Sep 2023
    Release notes

    Fixed

    • Fixed singularities in Quat::to_euler.

    Added

    • Added div_euclid and rem_euclid to integer vector types.

    • Added wrapping and saturating arithmetic operations to integer vector types.

    • Added to_scale_angle_translation to 2D affine types.

    • Added mul_assign ops to affine types.

    Changed

    • Disable default features on optional rkyv dependency.
    Open source →
  31. 0.24.1 24 Jun 2023
    Release notes

    Added

    • Implemented missing bytemuck, mint, rand, rkyv and serde traits for i64 and u64 types.

    • Added missing safe From conversions from f32 vectors to f64 vectors.

    • Added TryFrom implementations between different vector types.

    • Added test and set methods to bool vector types for testing and setting individual mask elements.

    • Added MIN, MAX, INFINITY and NEG_INFINITY vector constants.

    Open source →
  32. 0.24.0 24 Apr 2023
    Release notes

    Breaking changes

    • Enabling libm in a std build now overrides the std math functions. This is unlikely to break anything but it is a change in behavior.

    Added

    • Added i64 and u64 vector types; I64Vec2, I64Vec3, I64Vec4, U64Vec2, U64Vec3 and U64Vec4.

    • Added length_squared method on signed and unsigned integer vector types.

    • Added distance_squared method on signed integer vector types.

    • Implemented the bytemuck AnyBitPattern trait on Vec3A, Mat3A and Affine3A.

    Changed

    • Changed quaternion to_axis_angle for improved numerical stability.

    Removed

    • Removed dependency on serde_derive for improved compile times when using serde.
    Open source →
  33. 0.23.0 20 Feb 2023
    Release notes

    Breaking changes

    • When the scalar-math feature is enabled the vector mask type for Vec3A was changed from BVec3 to BVec3A.

    Added

    • Added copysign method to signed vector types.
    Open source →
  34. 0.22.0 24 Oct 2022
    Release notes

    Breaking changes

    • Added u32 implementation of BVec3A and BVec4 when SIMD is not available. These are used instead of aliasing to the bool implementations.

    • Removed Add, Sub, and scalar Mul implementations from affine types as they didn't make sense on these types.

    • Removed deprecated const_* macros. These have been replaced by const fn methods.

    Fixed

    • Fixed neg and signum to consistently handle negative zero across multiple platforms.

    • Removed register_attr feature usage for SPIR-V targets.

    Added

    • Added missing Serialize, Deserialize and PartialEq implementations.

    • Added Sum<Self> and Product<Self> implementations for all vector, matrix and quaternion types.

    • Added 4x4 matrix methods look_to_lh and look_to_rh. These were previously private.

    • Added dot_into_vec methods to vector which returns the result of the dot product splatted to all vector lanes.

    • Added is_negative_bitmask to vector types which returns a u32 of bits for each negative vector lane.

    • Added splat method and TRUE and FALSE constants to all BVec types.

    • Added from_mat3a methods to Affine2, Mat2, Mat4 and Quat types.

    Changed

    • Disable serde default features.

    • Made to_cols_array, to_cols_array_2d, and from_diagonal methods const fn.

    Open source →
  35. 0.21.3 02 Aug 2022
    Release notes

    Fixed

    • Fixed glam_assert being too restrictive in matrix transform point and transform vector methods.

    Added

    • Added experimental core-simd feature which enables SIMD support via the unstable core::simd module.

    Changed

    • Derive from PartialEq and Eq instead of providing a trait implementation for all non SIMD types.
    Open source →
  36. 0.21.2 25 Jun 2022
    Release notes

    Fixed

    • Restore missing $crate:: prefix in deprecated const_* macros.

    • Fixed some performance regressions in affine and matrix determinant and inverses due to lack of inlining.

    • Fixed some performance regressions in the SSE2 Vec3A to Vec3 from conversion.

    Added

    • Implemented BitXor and BitXorAssign traits for bool vectors.
    Open source →
  37. 0.21.1 22 Jun 2022
    Release notes

    Fixed

    • Fix compilation when FMA support is enabled.
    Open source →
  38. 0.21.0 22 Jun 2022 withdrawn
    Release notes

    Breaking changes

    • Minimum Supported Version of Rust bumped to 1.58.1 to allow const pointer dereferences in constant evaluation.

    • The abs_diff_eq method on Mat2 and DMat2 now takes other by value instead of reference. This is consistent with the other matrix types.

    • The AsMut and Deref trait implementations on Quat and DQuat was removed. Quaternion fields are now public.

    • The AsRef trait implementations were removed from BVec2, BVec3, BVec3A, BVec4 and BVec4A.

    Added

    • NEG_ONE constant was added to all signed vector types.

    • NEG_X, NEG_Y, NEG_Z and NEG_W negative axis vectors were added to signed vector types.

    • The rotate and from_angle methods were added to Vec2 and DVec2. from_angle returns a 2D vector containing [angle.cos(), angle.sin()] that can be used to rotate another 2D vector.

    • The from_array const function was added to all vector types.

    Changed

    • Source code is now largely generated. This removes most usage of macros internally to improve readability. There should be no change in API or behavior other than what is documented here.

    • Many methods have been made const fn:

      • new, splat, from_slice, to_array and extend on vector types
      • from_cols, from_cols_array, from_cols_array_2d, from_cols_slice on matrix types
      • from_xyzw and from_array on quaternion types
      • from_cols on affine types
    • The const new macros where deprecated.

    Removed

    • Deleted deprecated TransformRT and TransformSRT types.
    Open source →
  39. 0.20.5 12 Apr 2022
    Release notes

    Fixed

    • Fixed a bug in the scalar implementation of 4D vector max_element method where the w element check was incorrect.
    Open source →
  40. 0.20.4 11 Apr 2022
    Release notes

    Fixed

    • Fixed a bug with quaternion slerp with a rotation of tau.
    Open source →
  41. 0.20.3 28 Mar 2022
    Release notes

    Added

    • Added to_array() to Quat and DQuat.
    • Added mul_add method to all vector types - note that this will be slower without hardware support enabled.
    • Added the fast-math flag which will sacrifice some float determinism for speed.

    Fixed

    • Fixed a bug in the sse2 and wasm32 implementations of Mat4::determinant().
    Open source →
  42. 0.20.2 19 Dec 2021
    Release notes

    Fixed

    • Fixed SPIR-V build which was broken due to a typo.
    Open source →
  43. 0.20.1 23 Nov 2021
    Release notes

    Added

    • Added the from_rotation_arc_2d() method to Quat and DQuat which will return a rotation between two 2D vectors around the z axis.
    • Added impl of Neg operator for matrix types.
    • Added cuda feature which forces glam types to match cuda's alignment requirements.

    Changed

    • The Quat and DQuat methods from_rotation_arc() and from_rotation_arc_colinear() are now available in no_std.
    • The Vec3 and DVec3 methods any_orthogonal_vector(), any_orthonormal_vector() and any_orthonormal_pair() are now available in no_std.
    • Added repr(C) attribute to affine types.

    Removed

    • Removed deprecated as_f32(), as_f64(), as_i32() and as_u32() methods.
    Open source →
  44. 0.20.0 01 Nov 2021
    Release notes

    Breaking changes

    • Minimum Supported Version of Rust bumped to 1.52.1 for an update to the mint crate.

    Added

    • Added implementations for new IntoMint trait from the mint crate.
    • Added mint conversions for Mat3A.
    • Added as_vec3a cast methods to vector types.
    Open source →
  45. 0.19.0 05 Oct 2021
    Release notes

    Breaking changes

    • Removed truncating vector From implementations. Use .truncate() or swizzle methods instead.

    Added

    • Added Not, Shl, Shr, BitAnd, BitOr and BitXor implementations for all IVec and UVec vector types.
    • Added NAN constant for all types.
    • Documented glam's architecture.

    Changed

    • Sum and Product traits are now implemented in no_std builds.
    Open source →
  46. 0.18.0 26 Aug 2021
    Release notes

    Breaking changes

    • Minimum Supported Version of Rust bumped to 1.51.0 for wasm-bindgen-test and rustdoc alias support.

    Added

    • Added wasm32 SIMD intrinsics support.
    • Added optional support for the rkyv serialization crate.
    • Added Rem and RemAssign implementations for all vector types.
    • Added quaternion xyz() method for returning the vector part of the quaternion.
    • Added From((Scalar, Vector3)) for 4D vector types.

    Changed

    • Deprecated as_f32(), as_f64(), as_i32() and as_u32() methods in favor of more specific methods such as as_vec2(), as_dvec2(), as_ivec2() and as_uvec2() and so on.
    Open source →
  47. 0.17.3 18 Jul 2021
    Release notes

    Fixed

    • Fix alignment unit tests on non x86 platforms.
    Open source →
  48. 0.17.2 15 Jul 2021
    Release notes

    Fixed

    • Fix alignment unit tests on i686 and S390x.
    Open source →
  49. 0.17.1 29 Jun 2021
    Release notes

    Added

    • Added serde support for Affine2, DAffine2, Affine3A and DAffine3.
    Open source →
  50. 0.17.0 26 Jun 2021
    Release notes

    Breaking changes

    • The addition of Add and Sub implementations of scalar values for vector types may create ambiguities with existing calls to add and sub.
    • Removed From<Mat3> implementation for Mat2 and From<DMat3> for DMat2. These have been replaced by Mat2::from_mat3() and DMat2::from_mat3().
    • Removed From<Mat4> implementation for Mat3 and From<DMat4> for DMat3. These have been replaced by Mat3::from_mat4() and DMat3::from_mat4().
    • Removed deprecated from_slice_unaligned(), write_to_slice_unaligned(), from_rotation_mat4 and from_rotation_ypr() methods.

    Added

    • Added col_mut() method which returns a mutable reference to a matrix column to all matrix types.
    • Added AddAssign, MulAssign and SubAssign implementations for all matrix types.
    • Added Add and Sub implementations of scalar values for vector types.
    • Added more glam_assert! checks and documented methods where they are used.
    • Added vector projection and rejection methods project_onto(), project_onto_normalized(), reject_from() and reject_from_normalized().
    • Added Mat2::from_mat3(), DMat2::from_mat3(), Mat3::from_mat4(), DMat3::from_mat4() which create a smaller matrix from a larger one, discarding a final row and column of the input matrix.
    • Added Mat3::from_mat2(), DMat3::from_mat2(), Mat4::from_mat3() and DMat4::from_mat3() which create an affine transform from a smaller linear transform matrix.

    Changed

    • Don't support AsRef and AsMut on SPIR-V targets. Also removed SPIR-V support for some methods that used as_ref(), including hash(). Not a breaking change as these methods would not have worked anyway.

    Fixed

    • Fixed compile time alignment checks failing on i686 targets.
    Open source →
  51. 0.16.0 06 Jun 2021
    Release notes

    Breaking changes

    • sprirv-std dependency was removed, rust-gpu depends on glam internally again for now.
    • Added must_use attribute to all inverse(), normalize(), try_normalize(), transpose() and conjugate() methods.

    Added

    • Added fract() method to float vector types which return a vector containing self - self.floor().
    • Added optional support for the approx crate. Note that all glam types implement their own abs_diff_eq() method without requiring the approx dependency.
    Open source →
  52. 0.15.2 19 May 2021
    Release notes

    Added

    • Added from_cols() methods to affine types.
    • Added methods for reading and writing affine types from and to arrays and slices, including from_cols_array(), to_cols_array(), from_cols_array_2d(), to_cols_array_2d(), from_cols_slice() and write_cols_to_slice().
    • Added core::fmt::Display trait implementations for affine types.
    • Added core::ops::Add, core::ops::Mul scalar and core::ops::Sub trait implementations for affine types.
    • Added from_array() methods to quaternion types.

    Changed

    • Renamed vector and quaternion from_slice_unaligned() and write_to_slice_unaligned() methods to from_slice() and write_to_slice().
    • Removed usage of _mm_rcp_ps from SSE2 implementation of Quat::slerp as this instruction is not deterministic between Intel and AMD chips.
    Open source →
  53. 0.15.1 14 May 2021
    Release notes

    Changed

    • Disable const_assert_eq! size and alignment checks for SPIR-V targets.
    Open source →
  54. 0.15.0 14 May 2021
    Release notes

    Breaking changes

    • Removed PartialOrd and Ord trait implementations for all glam types.
    • Removed deprecated zero(), one(), unit_x(), unit_y(), unit_z(), unit_w(), identity() and Mat2::scale() methods.
    • Remove problematic Quat From trait conversions which would allow creating a non-uniform quaternion without necessarily realizing, including from Vec4, (x, y, z, w) and [f32; 4].

    Added

    • Added EulerRot enum for specifying Euler rotation order and Quat::from_euler(), Mat3::from_euler() and Mat4::from_euler() which support specifying a rotation order and angles of rotation.
    • Added Quat::to_euler() method for extracting Euler angles.
    • Added Quat::from_vec4() which is an explicit method for creating a quaternion from a 4D vector. The method does not normalize the resulting quaternion.
    • Added Mat3A type which uses Vec3A columns. It is 16 byte aligned and contains internal padding but it generally faster than Mat3 for most operations if SIMD is available.
    • Added 3D affine transform types Affine3A and DAffine3. These are more efficient than using Mat4 and DMat4 respectively when working with 3D affine transforms.
    • Added 2D affine transform types Affine2 and DAffine2. These are more efficient than using Mat3 and DMat3 respectively when working with 2D affine transforms.
    • Added Quat::from_affine3() to create a quaternion from an affine transform rotation.
    • Added explicit to_array() method to vector types to better match the matrix methods.

    Changed

    • Deprecated Quat::from_rotation_ypr(), Mat3::from_rotation_ypr() and Mat4::from_rotation_ypr() in favor of new from_euler() methods.
    • Deprecated Quat::from_rotation_mat3() and Quat::from_rotation_mat4() in favor of new from_mat3 and from_mat4 methods.
    • Deprecated TransformSRT and TransformRT which are under the transform-types feature. These will be moved to a separate experimental crate.
    • Updated spirv-std dependency version to 0.4.0-alpha7.
    Open source →
  55. 0.14.0 09 Apr 2021
    Release notes

    Breaking changes

    • Minimum Supported Version of Rust bumped to 1.45.0 for the spirv-std dependency.

    Added

    • Added AXES[] constants to all vector types. These are arrays containing the unit vector for each axis.
    • Added quaternion from_scaled_axis and to_scaled_axis methods.

    Changed

    • Updated dependency versions of bytemuck to 1.5, rand to 0.8, rand_xoshiro to 0.6 and spirv-std to 0.4.0-alpha4.
    Open source →
  56. 0.13.1 24 Mar 2021
    Release notes

    Added

    • Added vector clamp() functions.
    • Added matrix column and row accessor methods, col() and row().
    • Added SPIR-V module and dependency on spirv-std for the SPIR-V target.
    • Added matrix truncation from 4x4 to 3x3 and 3x3 to 2x2 via From impls.

    Changed

    • Documentation corrections and improvements.
    Open source →
  57. 0.13.0 04 Mar 2021
    Release notes

    Breaking changes

    • The behavior of the 4x4 matrix method transform_point3() was changed to not perform the perspective divide. This is an optimization for use with affine transforms where perspective correction is not required. The project_point3() method was added for transforming points by perspective projections.
    • The 3x3 matrix from_scale() method was changed to create a affine transform containing a 2-dimensional non-uniform scale to be consistent with the 4x4 matrix version. The from_diagonal() method can be used to create a 3x3 scale matrix.
    • The 3x3 matrix methods transform_point2_as_vec3a, transform_vector2_as_vec3a and mul_vec3_as_vec3a were unintentionally pub and are no longer publicly accessible.

    Added

    • Added Vec2::X, Vec4::W etc constants as a shorter versions of unit_x() and friends.
    • Added ONE constants for vectors.
    • Added IDENTITY constants for Mat2, Mat3, Mat4 and Quat.
    • Added ZERO constant for vectors and matrices.
    • Added clamp_length(), clamp_length_max(), and clamp_length_min methods for f32 and f64 vector types.
    • Added try_normalize() and normalize_or_zero() for all real vector types.
    • Added from_diagonal() methods to all matrix types for creating diagonal matrices from a vector.
    • Added angle_between(), from_rotation_arc() and from_rotation_arc_colinear() to quaternion types.
    • Added quaternion inverse() which assumes the quaternion is already normalized and returns the conjugate.
    • Added from_translation() and from_angle() methods to 3x3 matrix types.
    • Added project_point3() method to 4x4 matrix types. This method is for transforming 3D vectors by perspective projection transforms.
    • Added Eq and Hash impls for integer vector types.

    Changed

    • Deprecated ::unit_x/y/z(), ::zero(), ::one(), ::identity() functions in favor of constants.
    Open source →
  58. 0.12.0 15 Jan 2021
    Release notes

    Breaking changes

    • Vec2Mask, Vec3Mask and Vec4Mask have been replaced by BVec2, BVec3, BVec3A, BVec4 and BVec4A. These types are used by some vector methods and are not typically referenced directly.

    Added

    • Added f64 primitive type support
      • vectors: DVec2, DVec3 and DVec4
      • square matrices: DMat2, DMat3 and DMat4
      • a quaternion type: DQuat
    • Added i32 primitive type support
      • vectors: IVec2, IVec3 and IVec4
    • Added u32 primitive type support
      • vectors: UVec2, UVec3 and UVec4
    • Added bool primitive type support
      • vectors: BVec2, BVec3 and BVec4

    Removed

    • build.rs has been removed.
    Open source →
    Release notes
    • ~1900 changes, numerous bugfixes

      • Highlights

        • The introductory documentation (now called The Rust Guide) has been completely rewritten, as have a number of supplementary guides.
        • Rust's package manager, Cargo, continues to improve and is sometimes considered to be quite awesome.
        • Many API's in std have been reviewed and updated for consistency with the in-development Rust coding guidelines. The standard library documentation tracks stabilization progress.
        • Minor libraries have been moved out-of-tree to the rust-lang org on GitHub: uuid, semver, glob, num, hexfloat, fourcc. They can be installed with Cargo.
        • Lifetime elision allows lifetime annotations to be left off of function declarations in many common scenarios.
        • Rust now works on 64-bit Windows.
      • Language

        • Indexing can be overloaded with the Index and IndexMut traits.
        • The if let construct takes a branch only if the let pattern matches, currently behind the 'if_let' feature gate.
        • 'where clauses', a more flexible syntax for specifying trait bounds that is more aesthetic, have been added for traits and free functions. Where clauses will in the future make it possible to constrain associated types, which would be impossible with the existing syntax.
        • A new slicing syntax (e.g. [0..4]) has been introduced behind the 'slicing_syntax' feature gate, and can be overloaded with the Slice or SliceMut traits.
        • The syntax for matching of sub-slices has been changed to use a postfix .. instead of prefix (.e.g. [a, b, c..]), for consistency with other uses of .. and to future-proof potential additional uses of the syntax.
        • The syntax for matching inclusive ranges in patterns has changed from 0..3 to 0...4 to be consistent with the exclusive range syntax for slicing.
        • Matching of sub-slices in non-tail positions (e.g. [a.., b, c]) has been put behind the 'advanced_slice_patterns' feature gate and may be removed in the future.
        • Components of tuples and tuple structs can be extracted using the value.0 syntax, currently behind the tuple_indexing feature gate.
        • The #[crate_id] attribute is no longer supported; versioning is handled by the package manager.
        • Renaming crate imports are now written extern crate foo as bar instead of extern crate bar = foo.
        • Renaming use statements are now written use foo as bar instead of use bar = foo.
        • let and match bindings and argument names in macros are now hygienic.
        • The new, more efficient, closure types ('unboxed closures') have been added under a feature gate, 'unboxed_closures'. These will soon replace the existing closure types, once higher-ranked trait lifetimes are added to the language.
        • move has been added as a keyword, for indicating closures that capture by value.
        • Mutation and assignment is no longer allowed in pattern guards.
        • Generic structs and enums can now have trait bounds.
        • The Share trait is now called Sync to free up the term 'shared' to refer to 'shared reference' (the default reference type.
        • Dynamically-sized types have been mostly implemented, unifying the behavior of fat-pointer types with the rest of the type system.
        • As part of dynamically-sized types, the Sized trait has been introduced, which qualifying types implement by default, and which type parameters expect by default. To specify that a type parameter does not need to be sized, write <Sized? T>. Most types are Sized, notable exceptions being unsized arrays ([T]) and trait types.
        • Closures can return !, as in || -> ! or proc() -> !.
        • Lifetime bounds can now be applied to type parameters and object types.
        • The old, reference counted GC type, Gc<T> which was once denoted by the @ sigil, has finally been removed. GC will be revisited in the future.
      • Libraries

        • Library documentation has been improved for a number of modules.
        • Bit-vectors, collections::bitv has been modernized.
        • The url crate is deprecated in favor of http://github.com/servo/rust-url, which can be installed with Cargo.
        • Most I/O stream types can be cloned and subsequently closed from a different thread.
        • A std::time::Duration type has been added for use in I/O methods that rely on timers, as well as in the 'time' crate's Timespec arithmetic.
        • The runtime I/O abstraction layer that enabled the green thread scheduler to do non-thread-blocking I/O has been removed, along with the libuv-based implementation employed by the green thread scheduler. This will greatly simplify the future I/O work.
        • collections::btree has been rewritten to have a more idiomatic and efficient design.
      • Tooling

        • rustdoc output now indicates the stability levels of API's.
        • The --crate-name flag can specify the name of the crate being compiled, like #[crate_name].
        • The -C metadata specifies additional metadata to hash into symbol names, and -C extra-filename specifies additional information to put into the output filename, for use by the package manager for versioning.
        • debug info generation has continued to improve and should be more reliable under both gdb and lldb.
        • rustc has experimental support for compiling in parallel using the -C codegen-units flag.
        • rustc no longer encodes rpath information into binaries by default.
      • Misc

        • Stack usage has been optimized with LLVM lifetime annotations.
        • Official Rust binaries on Linux are more compatible with older kernels and distributions, built on CentOS 5.10.
    Open source →
  59. 0.11.3 29 Dec 2020
    Release notes

    Changed

    • Made Vec3 repr(simd) for spirv targets.

    Added

    • Added From<(Vec2, f32)> for Vec3 and From<(Vec3, f32) for Vec4.
    Open source →
  60. 0.11.2 03 Dec 2020
    Release notes

    Changed

    • Compilation fixes for Rust 1.36.0.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive