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

bitshifter / glam-rs / 33066534720
99%

Build:
DEFAULT BRANCH: main
Ran 27 Aug 2026 11:15AM UTC
Jobs 4
Files 153
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

27 Aug 2026 11:14AM UTC coverage: 99.113% (+0.01%) from 99.103%
33066534720

push

github

web-flow
fix(core-simd): make the core-simd backend build without std (#789)

# Objective

- Fixes #729.
- The `core-simd` backend doesn't compile in a `no_std` build. Enabling
it without `std` currently fails with 18 errors.

To reproduce on nightly:

```
cargo build --no-default-features --features core-simd,libm,all-types
```

It all comes from one line. The vec template pulls in `use
std::simd::StdFloat`, which only exists when `std` does, so you get the
unresolved `std` import plus every `sqrt`, `round`, `floor`, `ceil`,
`trunc` and `mul_add` call that trait was providing. Only `vec3a.rs` and
`vec4.rs` are affected.

## Solution

Added a small `StdFloat` stand-in in `src/coresimd.rs` that's only
compiled when `std` is off. It implements those six methods for `f32x4`
lane by lane through the existing `math` module, so in a `no_std` build
they go via `libm`. Only the methods glam actually calls are there, so
it's a lot smaller than the real `StdFloat`.

When `std` is enabled nothing changes, the real `std::simd::StdFloat` is
still re-exported and used, so there's no performance difference for
existing builds.

The template import is now `crate::coresimd::StdFloat` instead of
relying on the existing `coresimd::*` glob. An explicit import shadows
the globs, so it can't go ambiguous if `core::simd` ever grows its own
`StdFloat`.

## Code generation

Yes, `templates/vec.rs.tera` was modified and the generator was run.
`src/coresimd.rs` is hand written. The generated diff is the one import
line in `vec3a.rs` and `vec4.rs`.

## Testing and linting

The existing `core-simd` CI job only ever ran `cargo test --features
core-simd`, which is the default `std` build, so it would never have
caught this. I extended that command to also run the suite with
`--no-default-features --features core-simd,libm,all-types`, so `cargo
run -p ci -- core-simd` now covers both and this can't regress.

The full test suite passes on the `no_std` path, so the fallback matches
what the `s... (continued)

18 of 18 new or added lines in 2 files covered. (100.0%)

91428 of 92246 relevant lines covered (99.11%)

125352.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 core_simd-ubuntu-latest - 33066534720.1 27 Aug 2026 11:16AM UTC 120
98.97
GitHub Action Run
2 scalar_math-ubuntu-latest - 33066534720.2 27 Aug 2026 11:15AM UTC 120
99.04
GitHub Action Run
3 native_simd-ubuntu-latest - 33066534720.3 27 Aug 2026 11:15AM UTC 121
99.0
GitHub Action Run
4 native_simd-macos-latest - 33066534720.4 27 Aug 2026 11:16AM UTC 121
99.02
GitHub Action Run
Source Files on build 33066534720
  • Tree
  • List 153
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33066534720
  • bf476950 on github
  • Prev Build on main (#33066326713)
  • Next Build on main (#33155164908)
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