Skip to content

v0.3.0

Choose a tag to compare

@MiCkEyZzZ MiCkEyZzZ released this 27 Apr 16:48

Precision & Overflow (#TIME-11)

  • Added Time::MIN constant (alias for EPOCH)
  • Added documentation about value range: Time<S> covers ~584 years from epoch (Time<Gps> up to year 2554)
  • Added test_time_max_behavior to verify overflow handling
  • Added clippy::arithmetic_overflow lint to CI

Benchmarks (#TIME-12)

  • Added benches/arithmetic_bench.rs – proves zero-cost abstractions:
    • Time<Gps> + Duration: 512 ps (raw u64 + u64: 517 ps)
    • Time<Gps> - Duration: 512 ps (raw u64 - u64: 518 ps)
  • Added benches/convert_bench.rs:
    • GPS → TAI: ~0.8 ns
    • GPS → Galileo: ~0.8 ns
    • GPS → BeiDou: ~0.9 ns
    • GPS → UTC (with leap seconds): ~9.5 ns (< 10 ns target)
    • GLONASS → UTC (constant shift): ~0.8 ns
    • GLONASS → GPS (via UTC + LS): ~22.4 ns
  • Uses criterion with HTML reports

Full no_std Compatibility (#TIME-10)

  • All types are Copy – no allocations anywhere
  • defmt::Format implementation behind defmt feature flag
  • Fixed LeapSeconds::builtin() – now uses static instance instead of const fn
  • Cross-compilation tests for embedded targets:
    • thumbv7em-none-eabihf (STM32F4/F7, nRF52)
    • thumbv7em-none-eabi (Cortex-M4/M7)
    • riscv32imac-unknown-none-elf (ESP32-C3, GD32VF103)
  • Added .cargo/config.toml with embedded optimization settings
  • Added tests/no_std_compact.rs – verifies no Drop, Copy semantics, 8-byte alignment, no allocations

CI & Project Infrastructure

  • Added .github/workflows/embedded.yml – cross-compilation checks
  • Added .github/workflows/semantic-pull-request.yml – validates PR titles (feat:, fix:, etc.)
  • Added .github/pull_request_template.md – structured checklist
  • Added .github/ISSUE_TEMPLATE/enhancement.yml – enhancement request template
  • Added CODEOWNERS – automatic reviewer assignment
  • Updated justfile with new commands (check-no-std, ci, etc.)
  • Updated Cargo.toml with defmt feature, docs.rs metadata

Fixed

  • leap.rs: LeapSeconds::builtin() now works in no_std (static instance, not const fn)
  • time.rs: removed const from as_seconds_f64 (no_std compatibility)
  • time.rs: fixed typo "Дипазон значений" → "Диапазон значений"

Full Changelog

See CHANGELOG.md