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

kaidokert / fixed-bigint-rs / 28763199144
97%
main: 97%

Build:
Build:
LAST BUILD BRANCH: v0.4.1
DEFAULT BRANCH: main
Ran 06 Jul 2026 02:05AM UTC
Jobs 1
Files 30
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

06 Jul 2026 02:04AM UTC coverage: 97.473% (-0.1%) from 97.604%
28763199144

push

github

kaidokert
Byte-trait alignment step 2: `FromByteSlice` + `&FixedUInt: ToBytes`

Additive changes only. Prototype branch against `const-num-traits`
v0.1.2-alpha.0 (git tag; not yet on crates.io) — the trait
`FromByteSlice` + `ByteSliceError` + `ByteSliceErrorKind` ship there.
See `notes/BYTES_TRAIT_ALIGNMENT.md` for the four-way capability
split and the sequencing plan.

- Cargo.toml: temporary `[patch.crates-io]` pointing const-num-traits
  at the git tag. Drop once 0.1.2 is on crates.io.

- `impl const_num_traits::ToBytes for &FixedUInt<T, N, P>` — both
  stable (`to_from_bytes.rs`) and nightly (`const_to_from_bytes.rs`)
  variants. Body reads limbs through the reference so a
  `Zeroizing<FixedUInt>` secret doesn't get deref-copied onto the
  stack when its bytes are exported. Path (1) of the plan.

- `impl FromByteSlice for FixedUInt<T, N, P>` — new file
  `from_byte_slice_impl.rs`. Length-checks against `Self::BYTE_WIDTH`,
  routes to the existing `from_{be,le}_bytes(&[u8])` inherents which
  already zero-extend shorter input. Empty → `Empty`, wider →
  `Overflow`; never truncates. No `&FixedUInt` mirror — the
  associated fn has no storage source. Capability (b) of the plan.

- Capability (c) — const-eval `from_{le,be}_bytes_const<K>` inherents —
  deferred to a follow-up. `impl_from_*_bytes_slice` is const-callable
  only from within a c0nst trait impl (where `[c0nst]` bounds are
  legal); the DSL rejects `[c0nst]` bounds on inherent impls. Needs
  either a stable rewrite of the slice reader or a separate
  const-trait home. Not blocking on this hop — no consumer of the
  additive-step migration depends on it.

Path (2) — the semver-breaking flip of `FromBytes::Bytes` from
`BytesHolder<T, N>` to `[u8]` — is the fourth step in the sequencing
plan, lands after `rsa/new_reduce` migrates off the associated-type
binding. Not in this branch.

200 lib + 213 nightly-lib tests pass; feature sweep green
({-,zeroize,use-unsafe,num-traits,cios,no-default}).

65 of 71 new or added lines in 2 files covered. (91.55%)

3202 of 3285 relevant lines covered (97.47%)

302.35 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
80.99
-3.57% src/fixeduint/to_from_bytes.rs
Jobs
ID Job ID Ran Files Coverage
1 28763199144.1 06 Jul 2026 02:05AM UTC 30
97.47
GitHub Action Run
Source Files on build 28763199144
  • Tree
  • List 30
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28763199144
  • 4b138eec on github
  • Prev Build on main (#28753069087)
  • Next Build on experiment/from-byte-slice (#28763374916)
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