• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitshifter / glam-rs / 36701173342
99%

Build:
DEFAULT BRANCH: main
Ran 30 Sep 2026 10:15AM UTC
Jobs 4
Files 154
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Sep 2026 10:14AM UTC coverage: 99.046% (+0.02%) from 99.022%
36701173342

push

github

web-flow
feat(assert): report caller location for glam_assert panics (#884)

# Objective

Fixes #868.

When a `glam_assert!` check fails, the panic points at a line inside
glam, even though the mistake is in the calling code. This changes those
panics to point at the caller instead.

While checking every assert, some panics were found that were never
documented, and some projection functions that quietly returned a broken
matrix (infinities/NaN) for invalid input. Both are fixed here too.

# Solution

Rust's `#[track_caller]` attribute makes a panic report the caller's
location, but only if every function in the call chain has it. Added it
to every glam function that can reach an assert, gated on
`any(debug_assertions, feature = "glam-assert")` so builds where asserts
are off pay nothing for it.

Also:

- documented the panics that happen through another glam call and added
tests for them;
- added two cases that weren't documented: `look_to_*` panics when the
direction and up vector point the same way, and `look_at_*` panics when
the eye and target are the same point;
- added `glam_assert!` checks to `perspective`, `frustum` and
`orthographic` for invalid arguments which could produce infinities/NaN;
- added `#[track_caller]` to functions that panic via a plain
`assert!`/`panic!`/indexing (slice constructors, matrix `col`/`row`,
`BVec::test`/`set`, …), since those panic regardless of the assert
features;
- added `tests/panic_location.rs`, which checks that panics really do
point at the caller for a representative set of functions.

124 of 124 new or added lines in 13 files covered. (100.0%)

28 existing lines in 10 files now uncovered.

93470 of 94370 relevant lines covered (99.05%)

123236.58 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
95.62
-2.19% src/bool/coresimd/bvec3a.rs
3
98.23
-0.44% src/f32/coresimd/mat3a.rs
3
99.73
0.55% src/f32/coresimd/mat4.rs
3
96.98
-0.6% src/f32/coresimd/quat.rs
3
98.51
-0.37% src/f32/coresimd/vec4.rs
3
97.47
0.84% src/f32/scalar/quat.rs
3
99.21
0.0% src/f32/sse2/vec3a.rs
3
98.45
-0.36% src/f32/sse2/vec4.rs
3
99.28
-0.27% src/isize/isizevec2.rs
1
88.14
0.0% src/f32/affine3a.rs
Jobs
ID Job ID Ran Files Coverage
1 native_simd-macos-latest - 36701173342.1 30 Sep 2026 10:16AM UTC 122
98.87
GitHub Action Run
2 scalar_math-ubuntu-latest - 36701173342.2 30 Sep 2026 10:15AM UTC 121
98.89
GitHub Action Run
3 core_simd-ubuntu-latest - 36701173342.3 30 Sep 2026 10:15AM UTC 121
98.88
GitHub Action Run
4 native_simd-ubuntu-latest - 36701173342.4 30 Sep 2026 10:15AM UTC 122
98.9
GitHub Action Run
Source Files on build 36701173342
  • Tree
  • List 154
  • Changed 94
  • Source Changed 91
  • Coverage Changed 94
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36701173342
  • 273140fe on github
  • Prev Build on main (#36534646484)
  • Next Build on main (#36705709108)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc