NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #649 most downloaded on crates.io
A simple and fast 3D math library for games and graphics
Latest stable
0.34.3
Last release 11 days ago
08 Nov 2026
Release timing varies
gaps range from 1 weeks to 3 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
7 years old
101 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
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…
Add and Sub implementations of scalar values for vector
types may create ambiguities with existing calls to add and sub.From<Mat3> implementation for Mat2 and From<DMat3> for DMat2.
These have been replaced by Mat2::from_mat3() and DMat2::from_mat3().From<Mat4> implementation for Mat3 and From<DMat4> for DMat3.
These have been replaced by Mat3::from_mat4() and DMat3::from_mat4().from_slice_unaligned(), write_to_slice_unaligned(),
from_rotation_mat4 and from_rotation_ypr() methods.col_mut() method which returns a mutable reference to a matrix column
to all matrix types.AddAssign, MulAssign and SubAssign implementations for all matrix
types.Add and Sub implementations of scalar values for vector types.glam_assert! checks and documented methods where they are used.project_onto(),
project_onto_normalized(), reject_from() and reject_from_normalized().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.Mat3::from_mat2(), DMat3::from_mat2(), Mat4::from_mat3() and
DMat4::from_mat3() which create an affine transform from a smaller linear
transform matrix.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.Your coding agent can read these notes before it upgrades. Set up the MCP server →
sprirv-std dependency was removed, rust-gpu depends on glam internally again for now.
sprirv-std dependency was removed, rust-gpu depends on glam internally
again for now.must_use attribute to all inverse(), normalize(),
try_normalize(), transpose() and conjugate() methods.fract() method to float vector types which return a vector containing
self - self.floor().approx crate. Note that all glam types
implement their own abs_diff_eq() method without requiring the approx
dependency.Added from_cols() methods to affine types.
from_cols() methods to affine types.from_cols_array(), to_cols_array(),
from_cols_array_2d(), to_cols_array_2d(), from_cols_slice() and
write_cols_to_slice().core::fmt::Display trait implementations for affine types.core::ops::Add, core::ops::Mul scalar and core::ops::Sub trait
implementations for affine types.from_array() methods to quaternion types.from_slice_unaligned() and
write_to_slice_unaligned() methods to from_slice() and
write_to_slice()._mm_rcp_ps from SSE2 implementation of Quat::slerp as
this instruction is not deterministic between Intel and AMD chips.Disable const_assert_eq! size and alignment checks for SPIR-V targets.
const_assert_eq! size and alignment checks for SPIR-V targets.Removed deprecated zero(), one(), unit_x(), unit_y(), unit_z(), unit_w(), identity() and Mat2::scale() methods.
PartialOrd and Ord trait implementations for all glam types.zero(), one(), unit_x(), unit_y(), unit_z(),
unit_w(), identity() and Mat2::scale() methods.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].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.Quat::to_euler() method for extracting Euler angles.Quat::from_vec4() which is an explicit method for creating a
quaternion from a 4D vector. The method does not normalize the resulting
quaternion.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.Affine3A and DAffine3. These are more
efficient than using Mat4 and DMat4 respectively when working with 3D
affine transforms.Affine2 and DAffine2. These are more
efficient than using Mat3 and DMat3 respectively when working with 2D
affine transforms.Quat::from_affine3() to create a quaternion from an affine transform
rotation.to_array() method to vector types to better match the matrix
methods.Quat::from_rotation_ypr(), Mat3::from_rotation_ypr() and
Mat4::from_rotation_ypr() in favor of new from_euler() methods.Quat::from_rotation_mat3() and Quat::from_rotation_mat4() in
favor of new from_mat3 and from_mat4 methods.TransformSRT and TransformRT which are under the
transform-types feature. These will be moved to a separate experimental
crate.spirv-std dependency version to 0.4.0-alpha7.Minimum Supported Version of Rust bumped to 1.45.0 for the spirv-std dependency.
spirv-std
dependency.AXES[] constants to all vector types. These are arrays containing the
unit vector for each axis.from_scaled_axis and to_scaled_axis methods.bytemuck to 1.5, rand to 0.8,
rand_xoshiro to 0.6 and spirv-std to 0.4.0-alpha4.Added vector clamp() functions.
clamp() functions.col() and row().spirv-std for the SPIR-V target.From impls.Deprecated ::unit_x/y/z(), ::zero(), ::one(), ::identity() functions in favor of constants.
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.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.transform_point2_as_vec3a,
transform_vector2_as_vec3a and mul_vec3_as_vec3a were unintentionally
pub and are no longer publicly accessible.Vec2::X, Vec4::W etc constants as a shorter versions of unit_x()
and friends.ONE constants for vectors.IDENTITY constants for Mat2, Mat3, Mat4 and Quat.ZERO constant for vectors and matrices.clamp_length(), clamp_length_max(), and clamp_length_min methods
for f32 and f64 vector types.try_normalize() and normalize_or_zero() for all real vector types.from_diagonal() methods to all matrix types for creating diagonal
matrices from a vector.angle_between(), from_rotation_arc() and
from_rotation_arc_colinear() to quaternion types.inverse() which assumes the quaternion is already
normalized and returns the conjugate.from_translation() and from_angle() methods to 3x3 matrix types.project_point3() method to 4x4 matrix types. This method is for
transforming 3D vectors by perspective projection transforms.Eq and Hash impls for integer vector types.::unit_x/y/z(), ::zero(), ::one(), ::identity() functions
in favor of constants.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
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.f64 primitive type support
DVec2, DVec3 and DVec4DMat2, DMat3 and DMat4DQuati32 primitive type support
IVec2, IVec3 and IVec4u32 primitive type support
UVec2, UVec3 and UVec4bool primitive type support
BVec2, BVec3 and BVec4build.rs has been removed.~1900 changes, numerous bugfixes
Highlights
std have been reviewed and updated for
consistency with the in-development Rust coding
guidelines. The standard library documentation tracks
stabilization progress.Language
Index and IndexMut
traits.if let construct takes a branch only if the let pattern
matches, currently behind the 'if_let' feature gate.[0..4]) has been introduced behind
the 'slicing_syntax' feature gate, and can be overloaded with
the Slice or SliceMut traits... instead of prefix (.e.g. [a, b, c..]), for
consistency with other uses of .. and to future-proof
potential additional uses of the syntax.0..3 to 0...4 to be consistent with the exclusive range
syntax for slicing.[a.., b, c]) has been put behind the 'advanced_slice_patterns' feature
gate and may be removed in the future.value.0 syntax, currently behind the tuple_indexing
feature gate.#[crate_id] attribute is no longer supported; versioning
is handled by the package manager.extern crate foo as bar
instead of extern crate bar = foo.use foo as bar instead
of use bar = foo.let and match bindings and argument names in macros are now
hygienic.move has been added as a keyword, for indicating closures
that capture by value.Share trait is now called Sync to free up the term
'shared' to refer to 'shared reference' (the default reference
type.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.!, as in || -> ! or proc() -> !.Gc<T> which was once
denoted by the @ sigil, has finally been removed. GC will be
revisited in the future.Libraries
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.collections::btree has been rewritten to have a more
idiomatic and efficient design.Tooling
--crate-name flag can specify the name of the crate
being compiled, like #[crate_name].-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.-C codegen-units flag.Misc
Made Vec3 repr(simd) for spirv targets.
Vec3 repr(simd) for spirv targets.From<(Vec2, f32)> for Vec3 and From<(Vec3, f32) for Vec4.Compilation fixes for Rust 1.36.0.
Added support for the Rust GPU SPIR-V target architecture.
Removed deprecated accessor methods.
is_finite method to all types which returns true if, and only if,
all contained elements are finite.exp and powf methods for all vector types.is_nan method now returns a bool to match the new is_finite method
and to be consistent with the same methods on the f32 and f64 primitive
types.is_nan which returns a vector mask to is_nan_mask.cfg definitions added by build.rs for defining structs as
rust-analyzer is not aware of them.~1700 changes, numerous bugfixes
Language
uint
instead of any integral type.b.<'a>|A, B|: 'b + K -> Tpriv keyword has been removed from the language.use foo, bar, baz; syntax has been removed from the language.int, and floating point
literals no longer default to f64. Literals must be suffixed with an
appropriate type if inference cannot determine the type of the
literal.Libraries
rev() on
their forward-iteration counterparts.--cfg ndebug is passed to the compiler.Tooling
[breaking-change] to allow for easy
discovery of breaking changes.mod foo;.pub use has been greatly improved.Deprecated element accessor members .x(), .x_mut(), .set_x(), etc. on vector and quaternion types.
.x(), .x_mut(), .set_x(), etc. on
vector and quaternion types..x_axis(), .x_axis_mut(),
.set_x_axis(), etc. on matrix types.Removed deprecated length_reciprocal and sign methods.
Vec2::perp method which returns a Vec2 perpendicular to self.Vec2 and Vec3 types were changed to use public named fields for .x,
.y, and .z instead of accessors.Quat, Vec3A and Vec4 implement Deref and DerefMut for the new XYZ
and XYZW structs to emulate public named field access.Mat3 and Mat4 had their axis members made public instead of needing
accessors.Mat2 implements Deref and DerefMut for the new XYAxes struct to
emulate public named field access.length_reciprocal and sign methods.glam as a no_std dependency should now work as expected.Changed the return type of Vec4::truncate from Vec3A to Vec3.
Vec4::truncate from Vec3A to Vec3.From implementations to truncate to narrower vector types, e.g.
Vec4 to Vec3A, Vec3 and Vec2 and from Vec3A and Vec3 to Vec2.Vec4, Vec3A, Vec3 and Vec2. These can be used to
reorder elements in the same type and also to create larger or smaller
vectors from the given vectors elements.Quat operators Add<Quat>, Sub<Quat>, Mul<f32> and Div<f32.
These are used by other crates for interpolation quaternions along splines.
Note that these operations will not return unit length quaternions, thus the
results must be normalized before performing other Quat operations.Mat4::transform_point3a and Mat4::transform_vector3a.AsRef<[f32; 9]> and AsMut<[f32; 9]> trait implementations to Mat3.bytemuck support primarily for casting types to &[u8].no_std by disabling the default std
feature and adding the libm feature.distance and distance_squared methods to Vec2, Vec3, Vec3A
and Vec4.~1500 changes, numerous bugfixes
Language
@-pointers have been removed from the language.~[T]) have been removed from the
language.~str) have been removed from the
language.@str has been removed from the language.@[T] has been removed from the language.@self has been removed from the language.@Trait has been removed from the language.~ allocations which contain @ boxes inside the type for
reference counting have been removed.macro_rules! macros as
well as syntax extensions such as format!.#[deriving] with raw pointerslog_syntax! are now behind feature gates.#[simd] attribute is now behind a feature gate.extern crate statements, and
unnecessary visibility (priv) is no longer allowed on use statements.do keyword has been removed, it is now a reserved keyword.extern mod is now extern crateFreeze trait has been removed.Share trait has been added for types that can be shared among
threads.{} now.static mut locations has been tweaked.* and . operators are now overloadable through the Deref and
DerefMut traits.~Trait and proc no longer have Send bounds by default._ type marker.Unsafe type was introduced for interior mutability. It is now
considered undefined to transmute from &T to &mut T without using the
Unsafe type.#[foo]; to #![foo].Pod was renamed to Copy.Libraries
libextra library has been removed. It has now been decomposed into
component libraries with smaller and more focused nuggets of
functionality. The full list of libraries can be found on the
documentation index page.std::condition has been removed. All I/O errors are now propagated
through the Result type. In order to assist with error handling, a
try! macro for unwrapping errors with an early return and a lint for
unused results has been added. See #12039 for more information.vec module has been renamed to slice.Vec<T>, has been added in preparation for DST.
This will become the only growable vector in the future.std::io now has more public re-exports. Types such as BufferedReader
are now found at std::io::BufferedReader instead of
std::io::buffered::BufferedReader.print and println are no longer in the prelude, the print! and
println! macros are intended to be used instead.Rc now has a Weak pointer for breaking cycles, and it no longer
attempts to statically prevent cycles.slice::last()) now return Option<T> instead of T + failing.fmt::Default has been renamed to fmt::Show, and it now has a new
deriving mode: #[deriving(Show)].ToStr is now implemented for all types implementing Show.&self instead of &Tinvert() method on iterators has been renamed to rev()std::num has seen a reduction in the genericity of its traits,
consolidating functionality into a few core traits.RUST_BACKTRACE is present.eof() has been removed from the Reader trait. Specific types may
still implement the function.assert_approx_eq! has been removede and E formatting specifiers for floats have been added to
print them in exponential notation.Times trait has been removedstd::kinds::marker nowhash has been rewritten, IterBytes has been removed, and
#[deriving(Hash)] is now possible.SharedChan has been removed, Sender is now cloneable.Chan and Port were renamed to Sender and Receiver.Chan::new is now channel().select! macro is now provided for selecting over Receivers.hashmap and trie have been moved to libcollectionsrun has been rolled into io::processassert_eq! now uses {} instead of {:?}rand has moved to librand.to_{lower,upper}case has been implemented for char.liblog.HashMap has been rewritten for higher performance and less
memory usage.libnative. If libgreen is desired,
it can be booted manually. The runtime guide has more information and
examples.libgreen has been optimized with stack caching
and various trimming of code.libgreen now have an unmapped guard page.extra::sync module has been updated to modern rust (and moved
to the sync library), tweaking and improving various interfaces while
dropping redundant functionality.Barrier type has been added to the sync library.base64 module has seen some improvement. It treats
newlines better, has non-string error values, and has seen general
cleanup.fourcc! macro was introducedhexfloat! macro was implemented for specifying floats via a
hexadecimal literal.Tooling
rustpkg has been deprecated and removed from the main repository. Its
replacement, cargo, is under development.--emit flag.--crate-type flag.-C flag.rustdoc improvements:
glam uses SSE2 for some types which prevents constructor functions can not be made const fn. To work around this limitation the following macro functi
glam uses SSE2 for some types which prevents constructor functions can not
be made const fn. To work around this limitation the following macro
functions have been added to support creating const values of glam types:
const_mat2, const_mat3, const_mat4, const_quat, const_vec2,
const_vec3, const_vec3a and const_vec4.is_nan methods to Vec2, Vec3, Vec3A and Vec4 which return a
mask.Fixed Mat4::transform_point3 to account for homogeneous w coordinate. Previously this would have been incorrect when the resulting homogeneous coordin
Mat4::transform_point3 to account for homogeneous w coordinate.
Previously this would have been incorrect when the resulting homogeneous
coordinate was not 1.0, e.g. when transforming by a perspective projection.Mat3::transform_point2 to account for homogeneous z coordinate.### Added - Added Mat4::perspective_rh.
Mat4::perspective_rh.Added Mat3::mul_vec3a and Quat::mul_vec3a.
Mat3::mul_vec3a and Quat::mul_vec3a.Quat::mul_vec3 to accept and return Vec3 instead of Vec3A.Added Mat3 * Vec3A implementation.
Mat3 * Vec3A implementation.Vec3A benches.Vec3A type.Vec3 has been split into scalar Vec3 and 16 byte aligned Vec3A types. Only the Vec3A type currently uses SIMD optimizations.
Vec3 has been split into scalar Vec3 and 16 byte aligned Vec3A types.
Only the Vec3A type currently uses SIMD optimizations.Vec3Mask has been split into scalar Vec3Mask and 16 byte aligned
Vec3AMask types.mut column accessors to all matrix types, e.g. Mat2::x_axis_mut().From trait implementations for Vec3AMask and Vec4Mask to __m128.Mat3 type is using the scalar Vec3 type for storage.Debug trait output for Quat, Vec4 and Vec3A.~1800 changes, numerous bugfixes
Language
float type has been removed. Use f32 or f64 instead.#[feature(foo)] attribute.#[feature(managed_boxes)]) in preparation for future removal. Use the
standard library's Gc or Rc types instead.@mut has been removed. Use std::cell::{Cell, RefCell} instead.continue instead of
loop.r"foo" syntax or with matched
hash delimiters, as in r###"foo"###.~fn is now written proc (args) -> retval { ... } and may only be
called once.&fn type is now written |args| -> ret to match the literal form.@fns have been removed.do only works with procs in order to make it obvious what the cost
of do is.#[link(...)] attribute has been replaced with
#[crate_id = "name#vers"].impls must be terminated with empty braces and may not be
terminated with a semicolon.self lifetime
no longer has any special meaning.fmt! string formatting macro has been removed.printf! and printfln! (old-style formatting) removed in favor of
print! and println!.mut works in patterns now, as in let (mut x, y) = (1, 2);.extern mod foo (name = "bar") syntax has been removed. Use
extern mod foo = "bar" instead.alignof, offsetof, sizeof.asm! macro is feature-gated (#[feature(asm)]).as.repr attribute can be used to override
the discriminant size, as in #[repr(int)] for integer-sized, and
#[repr(C)] to match C enums.0o7777.concat! syntax extension performs compile-time string concatenation.#[fixed_stack_segment] and #[rust_stack] attributes have been
removed as Rust no longer uses segmented stacks.#[feature(non_ascii_idents)])...,
not *; ignoring remaining fields of a struct is also done with ..,
not _; ignoring a slice of a vector is done with .., not .._.rustc supports the "win64" calling convention via extern "win64".rustc supports the "system" calling convention, which defaults to the
preferred convention for the target platform, "stdcall" on 32-bit Windows,
"C" elsewhere.type_overflow lint (default: warn) checks literals for overflow.unsafe_block lint (default: allow) checks for usage of unsafe.attribute_usage lint (default: warn) warns about unknown
attributes.unknown_features lint (default: warn) warns about unknown
feature gates.dead_code lint (default: warn) checks for dead code.#[link_args] is behind the link_args feature gate.#[link(name = "foo")]#[link(name = "foo", kind = "static")]).#[link(name = "foo", kind = "framework")]).#[thread_local] attribute creates thread-local (not task-local)
variables. Currently behind the thread_local feature gate.return keyword may be used in closures.Pod kind.cfg attribute can now be used on struct fields and enum variants.Libraries
option and result API's have been overhauled to make them
simpler, more consistent, and more composable.std::io module has been replaced with one that is
more comprehensive and that properly interfaces with the underlying
scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all
implemented.io::util contains a number of useful implementations of
Reader and Writer, including NullReader, NullWriter,
ZeroReader, TeeReader.extra::rc moved into std.Gc type in the gc module will replace @ (it is currently
just a wrapper around it).Either type has been removed.fmt::Default can be implemented for any type to provide default
formatting to the format! macro, as in format!("{}", myfoo).rand API continues to be tweaked.rust_begin_unwind function, useful for inserting breakpoints
on failure in gdb, is now named rust_fail.each_key and each_value methods on HashMap have been
replaced by the keys and values iterators.sys module to the mem module.path module was written and API changed.str::from_utf8 has been changed to cast instead of allocate.starts_with and ends_with methods added to vectors via the
ImmutableEqVector trait, which is in the prelude.get_opt method, which returns None
if the index is out of bounds.Any type can be used for dynamic typing.~Any can be passed to the fail! macro and retrieved via
task::try._iter
suffix now.cell::Cell and cell::RefCell can be used to introduce mutability
roots (mutable fields, etc.). Use instead of e.g. @mut.util::ignore renamed to prelude::drop.sort and sort_by methods via the MutableVector
trait.vec::raw has seen a lot of cleanup and API changes.comm module has been rewritten to be much faster, have a
simpler, more consistent API, and to work for both native and green
threading.flatpipes module had bitrotted and was removed.c_vec has been modernized.sort module has been removed. Use the sort method on
mutable slices.Tooling
rust and rusti commands have been removed, due to lack of
maintenance.rustdoc was completely rewritten.rustdoc can test code examples in documentation.rustpkg can test packages with the argument, 'test'.rustpkg supports arbitrary dependencies, including C libraries.rustc's support for generating debug info is improved again.rustc has better error reporting for unbalanced delimiters.rustc's JIT support was removed due to bitrot.rustc adds a --dep-info flag for communicating dependencies to
build tools.Added Quat::slerp - note that this uses a sin approximation.
Quat::slerp - note that this uses a sin approximation.angle_between method for Vec2 and Vec3.Debug, Display, PartialEq, Eq, PartialOrd, Ord,
Hash, and AsRef traits for Vec2Mask, Vec3Mask and Vec4Mask.Vec2Mask, Vec3Mask and Vec4Mask to an
array of [u32].build.rs to simplify conditional feature compilation.cfg-if dependency.Added the packed-vec3 feature flag to disable using SIMD types for Vec3 and Mat3 types. This avoids wasting some space due to 16 byte alignment at the
packed-vec3 feature flag to disable using SIMD types for Vec3
and Mat3 types. This avoids wasting some space due to 16 byte alignment at
the cost of some performance.x_mut, y_mut, z_mut, w_mut where appropriate to Vec2, Vec3
and Vec4.core::ops::Index and core::ops::IndexMut for
Vec2, Vec3 and Vec4.Vec3 and Vec4 implementations into single files
using the cfg-if crate.Added projection functions Mat4::perspective_lh, Mat4::perspective_infinite_lh, Mat4::perspective_infinite_reverse_lh, Mat4::orthgraphic_lh and Mat4::
Mat4::perspective_lh,
Mat4::perspective_infinite_lh, Mat4::perspective_infinite_reverse_lh,
Mat4::orthgraphic_lh and Mat4::orthographic_rh.round, ceil and floor methods to Vec2, Vec3 and Vec4.Added Mat4::to_scale_rotation_translation for extracting scale, rotation and translation from a 4x4 homogeneous transformation matrix.
Mat4::to_scale_rotation_translation for extracting scale, rotation and
translation from a 4x4 homogeneous transformation matrix.cargo-deny GitHub Action.Quat::new to Quat::from_xyzw.Removed deprecated functions Mat2::new, Mat3::new and Mat4::new.
Mat4::orthographic_rh_gl.Mat4::perspective_glu_rh to Mat4::perspective_rh_gl.Mat2::determinant, Mat2::inverse,
Mat2::transpose, Mat3::transpose, Quat::conjugate, Quat::lerp,
Quat::mul_vec3, Quat::mul_quat and Quat::from_rotation_ypr.Mat4::transform_point3 and
Mat4::transform_vector3 as they are probably incorrect and need
investigating.#[repr(C)] to Mat2, Mat3 and Mat4.Mat2::new, Mat3::new and Mat4::new.glam_assert! is no longer enabled by default in debug builds, it can be enabled in any configuration using the glam-assert feature or in debug builds
glam_assert! is no longer enabled by default in debug builds, it can be
enabled in any configuration using the glam-assert feature or in debug
builds only using the debug-glam-assert feature.glam_assert!'s checking lerp is bounded between 0.0 and 1.0 and that
matrix scales are non-zero have been removed.Added Display trait implementations for Mat2, Mat3 and Mat4.
Display trait implementations for Mat2, Mat3 and Mat4.glam's SSE2 sin_cos implementation - it became less precise for
large angle values.is_normalized! macro from
std::f32::EPSILON to 1e-6.Removed the deprecated Vec2b, Vec3b and Vec4b types and the mask methods on Vec2Mask, Vec3Mask and Vec4Mask.
approx crate dependency. Each glam type has an abs_diff_eq
method added which is used by unit tests for approximate floating point
comparisons.Angle type. All angles are now f32 and are expected to
be in radians.Vec2b, Vec3b and Vec4b types and the mask
methods on Vec2Mask, Vec3Mask and Vec4Mask.rand crate dependency has been removed from default features. This was
required for benchmarking but a simple random number generator has been added
to the benches support module instead.From trait implementation converting between 1D and 2D f32 arrays and
matrix types have been removed. It was ambiguous how array data would map to
matrix columns so these have been replaced with explicit methods
from_cols_array and from_cols_array_2d.new methods have been renamed to from_cols to be consistent with
the other methods that create matrices from data.Mat4::perspective_glu to Mat4::perspective_glu_rh.~2200 changes, numerous bugfixes
Language
for loop syntax has changed to work with the Iterator trait.copy is no longer a keyword. It has been replaced by the Clone trait.debug! macro if it is passed
--cfg ndebugmod foo;, rustc will now look
for foo.rs, then foo/mod.rs, and will generate an error when both are
present.std::c_str module
provides new mechanisms for converting to C strings.extern "C" fn instead of `*u8'.#[fixed_stack_segment] attribute.externfn! macro can be used to declare both a foreign function and
a #[fixed_stack_segment] wrapper at once.pub and priv modifiers on extern blocks are no longer parsed.unsafe is no longer allowed on extern fns - they are all unsafe.priv is disallowed everywhere except for struct fields and enum variants.&T (besides &'static T) is no longer allowed in @T.ref bindings in irrefutable patterns work correctly now.char is now prevented from containing invalid code points.bool is no longer allowed.\0 is now accepted as an escape in chars and strings.yield is a reserved keyword.typeof is a reserved keyword.extern mod foo = "url";.enum E { V = 0u }static foo: [u8, .. 100]: [0, .. 100];.static foo: Foo = Foo { a: 5, .. bar };.cfg! can be used to conditionally execute code based on the crate
configuration, similarly to #[cfg(...)].unnecessary_qualification lint detects unneeded module
prefixes (default: allow).std::unstable::simd.format! implements a completely new, extensible, and higher-performance
string formatting system. It will replace fmt!.print! and println! write formatted strings (using the format!
extension) to stdout.write! and writeln! write formatted strings (using the format!
extension) to the new Writers in std::rt::io.#[link_section = "..."].proto! syntax extension for defining bounded message protocols
was removed.macro_rules! is hygienic for let declarations.#[export_name] attribute specifies the name of a symbol.unreachable! can be used to indicate unreachable code, and fails
if executed.Libraries
rt::io, based on the new
runtime.range function was added to the prelude, replacing
uint::range and friends.range_rev no longer exists. Since range is an iterator it can be
reversed with range(lo, hi).invert().chain method on option renamed to and_then; unwrap_or_default
renamed to unwrap_or.iterator module was renamed to iter.checked_add, checked_sub, and
checked_mul operations for detecting overflow.str, vec, option, result` were renamed for
consistency.to_foo for copying, into_foo for moving, as_foo for temporary
and cheap casts.CString type in c_str provides new ways to convert to and
from C strings.DoubleEndedIterator can yield elements in two directions.mut_split method on vectors partitions an &mut [T] into
two splices.str::from_bytes renamed to str::from_utf8.pop_opt and shift_opt methods added to vectors.swap_unwrap method of Option renamed to take_unwrap.SharedPort to comm.Eq has a default method for ne; only eq is required
in implementations.Ord has default methods for le, gt and ge; only lt
is required in implementations.is_utf8 performance is improved, impacting many string functions.os::MemoryMap provides cross-platform mmap.ptr::offset is now unsafe, but also more optimized. Offsets that
are not 'in-bounds' are considered undefined.vec removed in favor of methods.FromIterator so can be created by the
collect method.unstable::atomics.comm::PortSet removed.Set and Map traits have been moved into
the MutableSet and MutableMap traits. Container::is_empty,
Map::contains_key, MutableMap::insert, and MutableMap::remove have
default implementations.from_str functions were removed in favor of a generic
from_str which is available in the prelude.util::unreachable removed in favor of the unreachable! macro.dlist, the doubly-linked list was modernized.hex module with ToHex and FromHex traits.glob module, replacing std::os::glob.rope was removed.deque was renamed to ringbuf. RingBuf implements Deque.net, and timer were removed. The experimental replacements
are std::rt::io::net and std::rt::io::timer.SmallIntMap.Bitv and BitvSet.SmallIntSet removed. Use BitvSet.semver updated to SemVer 2.0.0.term handles more terminals correctly.dbg module removed.par module removed.future was cleaned up, with some method renames.getopts were converted to methods.Other
-Z debug-info) is greatly improved.--target-cpu to compile to a specific CPU architecture,
similarly to gcc's --march flag.--test now support the -h and --help flags.rustdoc command.Fixed incorrect projection matrix methods Mat4::look_at_lh and Mat4::look_at_rh.
Mat4::look_at_lh
and Mat4::look_at_rh.Mat4::perspective_infinite_rh and
Mat4::perspective_infinite_rh.Vec2Mask::new, Vec3Mask::new and Vec4Mask::new methods.std::ops BitAnd, BitAndAssign, BitOr, BitOrAssign
and Not traits for Vec2Mask, Vec3Mask and Vec4Mask.Vec4 and Vec4Mask types.serde implementations for Mat2, Mat3 and Mat4.rand and criterion versions.Renamed Vec2b to Vec2Mask, Vec3b to Vec3Mask and Vec4b to Vec4Mask. Old names are aliased to the new name and deprecated.
Vec4 dot was missing a shuffle, meaning the
dot, length, length_squared, length_reciprocal and normalize
methods were sometimes incorrect.glam_assert macro which behaves like Rust's debug_assert but
can be enabled separately to debug_assert. This is used to perform
asserts on correctness.is_normalized method to Vec2, Vec3 and Vec4.std::mem::uninitialized with std::mem::MaybeUninit. This
change requires stable Rust 1.36.Vec2b to Vec2Mask, Vec3b to Vec3Mask and Vec4b to
Vec4Mask. Old names are aliased to the new name and deprecated.VecNMask mask method, use new bitmask method insteadVecNMask types the same size and alignment as the
SIMD versions.Default support to VecNMask types, will add more common traits in
the future.#[inline] to mat2, mat3 and mat4 functions.Added Mat2 into [f32; 4], Mat3 into [f32; 9] and Mat4 into [f32; 16].
Mat2 into [f32; 4], Mat3 into [f32; 9] and Mat4 into
[f32; 16].impl Mul<&Vec2> for Mat2 and impl Mul<&Vec3> for Vec3 as these
don't exist for any other types.~2000 changes, numerous bugfixes
Language
impls no longer accept a visibility qualifier. Put them on methods
instead.self parameter no longer implicitly means &'self self,
and can be explicitly marked with a lifetime.+=, etc.) have been temporarily
removed due to bugs.for loop protocol now requires for-iterators to return bool
so they compose better.Durable trait is replaced with the 'static bounds.#[packed] attribute have byte alignment and
no padding between fields.Copy must now be copied explicitly with
the copy keyword.Option<~T> is now represented as a nullable pointer.@mut does dynamic borrow checks correctly.main function is only detected at the topmost level of the crate.
The #[main] attribute is still valid anywhere.#[no_send] attribute makes a type that would otherwise be
Send, not.#[no_freeze] attribute makes a type that would otherwise be
Freeze, not.RUST_MAX_STACK environment variable (default: 1GB).vecs_implicitly_copyable lint mode has been removed. Vectors
are never implicitly copyable.#[static_assert] makes compile-time assertions about static bools.use mod statement no longer exists.Syntax extensions
fail! and assert! accept ~str, &'static str or fmt!-style
argument list.Encodable, Decodable, Ord, TotalOrd, TotalEq, DeepClone,
Rand, Zero and ToStr can all be automatically derived with
#[deriving(...)].bytes! macro returns a vector of bytes for string, u8, char,
and unsuffixed integer literals.Libraries
core crate was renamed to std.std crate was renamed to extra.iterator module for external iterator objects.Iterator.any, all. removed.finalize method of Drop renamed to drop.drop method now takes &mut self instead of &self.print, println, FromStr, ApproxEq, Equiv,
Iterator, IteratorUtil, many numeric traits, many tuple traits.Fractional, Real, RealExt, Integer, Ratio,
Algebraic, Trigonometric, Exponential, Primitive.(0, 1, 2).n2() or (0, 1, 2).n2_ref().Clone.path type renamed to Path.mut module and Mut type removed.vec, str. In the future methods will also work as functions.reinterpret_cast removed. Use transmute.std::ascii.Rand is implemented for ~/@.run module for spawning processes overhauled.unstable::atomic.Zero.LinearMap and LinearSet renamed to HashMap and HashSet.ptr to borrow.os::mkdir_recursive.os::glob function performs filesystems globs.FuzzyEq renamed to ApproxEq.Map now defines pop and swap methods.Cell constructors converted to static methods.rc module adds the reference counted pointers, Rc and RcMut.flate module moved from std to extra.fileinput module for iterating over a series of files.Complex number type and complex module.Rational number type and rational module.BigInt, BigUint implement numeric and comparison traits.term uses terminfo now, is more correct.arc functions converted to methods.Tooling
unused_variables lint mode for unused variables (default: warn).unused_unsafe lint mode for detecting unnecessary unsafe blocks
(default: warn).unused_mut lint mode for identifying unused mut qualifiers
(default: warn).dead_assignment lint mode for unread variables (default: warn).unnecessary_allocation lint mode detects some heap allocations that are
immediately borrowed so could be written without allocating (default: warn).missing_doc lint mode (default: allow).unreachable_code lint mode (default: warn).rusti command has been rewritten and a number of bugs addressed.--link-args flag to pass arguments to the linker.-Z print-link-args flag for debugging linkage.-g will make the binary record information about
dynamic borrowcheck failures for debugging.Mat2 now uses a Vec4 internally which gives it some performance improvements when SSE2 is available.
Mat2 now uses a Vec4 internally which gives it some performance
improvements when SSE2 is available.Switched from row vectors to column vectors
~2100 changes, numerous bugfixes
Syntax changes
Selfself parameter in trait and impl methods must now be explicitly
named (for example: fn f(&self) { }). Implicit self is deprecated.static keyword and instead
are distinguished by the lack of a self parameterDurable trait with the 'static lifetimesuper is a keyword, and may be prefixed to paths+ instead of whitespaceimpl Trait for Type
instead of impl Type: Trait&'l foo instead of &l/fooexport keyword has finally been removedmove keyword has been removed (see "Semantic changes")[mut T], has been
removed. Use &mut [T], etc.mut is no longer valid in ~mut T. Use inherited mutabilityfail is no longer a keyword. Use fail!()assert is no longer a keyword. Use assert!()log is no longer a keyword. use debug!, etc.(T,)mut. Use inherited mutability,
@mut T, core::mut or core::cellextern mod { ... } is no longer valid syntax for foreign
function modules. Use extern blocks: extern { ... }const renamed to static to correspond to lifetime name,
and make room for future static mut unsafe mutable globals.#[deriving_eq] with #[deriving(Eq)], etc.Clone implementations can be automatically generated with
#[deriving(Clone)]@foo as @Bar
instead of foo as Bar.[int, .. 3]
instead of [int * 3].[int, .. GL_BUFFER_SIZE - 2])Semantic changes
move keyworduse statements may no longer be "chained" - they cannot import
identifiers imported by previous use statementsuse statements are crate relative, importing from the "top"
of the crate by default. Paths may be prefixed with super::
or self:: to change the search behavior.Libraries
std::bigintcore::oldcomm modulecore::comm modulecore::numvec::slice finally returns a slicedebug! and friends don't require a format string, e.g. debug!(Foo)core::containercore::dvec removed, ~[T] is a drop-in replacementcore::send_map renamed to core::hashmapstd::map removed; replaced with core::hashmapstd::treemap reimplemented as an owned balanced treestd::deque and std::smallintmap reimplemented as owned containerscore::trie added as a fast ordered map for integer keyscore::hashmap, core::trie and std::treemapOrd split into Ord and TotalOrd. Ord is still used to
overload the comparison operators, whereas TotalOrd is used
by certain container typesOther
rustc --test now supports benchmarks with the #[bench] attributeNothing published for this version
Nothing published for this version
core::comm renamed to oldcomm. Still deprecated
~900 changes, numerous bugfixes
Syntax changes
<- move operator#fmt extension syntax to fmt![T]/Nquote_tokens!, quote_expr!, etc.a.b() is always parsed as a method call, never as a field projectionEq and IterBytes implementations can be automatically generated
with #[deriving_eq] and #[deriving_iter_bytes] respectively.rc filesSemantic changes
& and ~ pointers may point to objectsstruct Foo(Bar, Baz). Will replace newtype enums.move explicitly&T may now be coerced to *Tlet statements as well as function callsuse statements now take crate-relative pathsImproved support for language features
self, &self
@self, and ~self all generally work as expectedLibraries
core::conditionstd::sortstd::priority_queuegetopts definitionsstdcore::comm renamed to oldcomm. Still deprecatedrustdoc and cargo are libraries nowMisc
rustiNothing published for this version
Nothing published for this version
pub and priv replace deprecated export lists
~2000 changes, numerous bugfixes
Syntax
ret became return and alt became matchimport is now use; use is now extern mod`extern mod { ... } is now extern { ... }use mod is the recommended way to import modulespub and priv replace deprecated export listsmatch pattern arms now uses fat arrow (=>)main no longer accepts an args vector; use os::args insteadSemantics
Libraries
std::net::url for representing URLscore::send_mapConcurrency
core::pipesstd::arc, an atomically reference counted, immutable, shared memory
typestd::sync, various exotic synchronization tools based on arcs and pipesOther
One column per quarter.