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

bitshifter / glam-rs / 345
94%
main: 97%

Build:
Build:
LAST BUILD BRANCH: refs/tags/0.30.10
DEFAULT BRANCH: main
Ran 16 Apr 2020 12:13PM UTC
Jobs 3
Files 26
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

pending completion
345

push

travis-ci

web-flow
Migrated from using cfg-if to setting mutually exclusive cfg values via build.rs (#55)

I was having a few issues with cfg-if like rustfmt didn't seem to like it and neither did tarpaulin.

Separate to that it seemed like checking target features and features in rust code was getting complicated with more targets and features. So instead I'm doing the more complex logic in rust code to generate mutually exclusive rust-cfg's that can be checked in Rust code. This is independent of whether or not cfg-if it being used.

For example:

```
    pub fn length(self) -> f32 {
        #[cfg(vec3sse2)]
        unsafe {
            _mm_cvtss_f32(_mm_sqrt_ss(self.dot_as_m128(self)))
        }

        #[cfg(vec3f32)]
        {
            self.dot(self).sqrt()
        }
    }
```

`cfg-if` using `else if` and `else` blocks but we don't have that with plain on `#[cfg(name)]`, instead I'm creating mutually exclusive cfgs which can both exist in the same function because they'll never both be compiled.

2885 of 3658 relevant lines covered (78.87%)

3.82 hits per line

Jobs
ID Job ID Ran Files Coverage
7 345.7 (CARGO_FEATURES="mint rand serde debug-glam-assert transform-types") 16 Apr 2020 12:13PM UTC 0
78.87
Travis Job 345.7
8 345.8 (CARGO_FEATURES="mint rand serde packed-vec3 debug-glam-assert transform-types") 16 Apr 2020 12:15PM UTC 0
78.87
Travis Job 345.8
9 345.9 (CARGO_FEATURES="mint rand serde scalar-math debug-glam-assert transform-types") 16 Apr 2020 12:14PM UTC 0
78.87
Travis Job 345.9
Source Files on build 345
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #345
  • 4c8a2dad on github
  • Prev Build on master (#339)
  • Next Build on master (#356)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc