Skip to content

Add detailed documentation for time-related structs and enums in temp…#5

Merged
VPRamon merged 1 commit intomainfrom
doc
Mar 7, 2026
Merged

Add detailed documentation for time-related structs and enums in temp…#5
VPRamon merged 1 commit intomainfrom
doc

Conversation

@VPRamon
Copy link
Member

@VPRamon VPRamon commented Mar 7, 2026

This pull request improves the clarity, safety, and test coverage of the tempoch-ffi crate, focusing on documentation, FFI struct definitions, and ABI stability. The most important changes are grouped below:

Documentation Enhancements:

  • Added detailed doc comments to all fields of the TempochScale enum, TempochPeriodMjd struct, and TempochUtc struct in both Rust and C header files, making the FFI interface much clearer for consumers. [1] [2] [3] [4] [5]

Safety and Code Quality:

  • Enabled strict compiler lints in Rust by adding #![deny(missing_docs)] and #![deny(unsafe_op_in_unsafe_fn)] to enforce documentation and safe usage of unsafe code throughout the crate.

Testing and ABI Stability:

  • Added a comprehensive test module (behind #[cfg(test)]) that verifies the size and alignment of all FFI-exposed types, ensuring ABI stability across releases. Also added a test for the FFI version function.

@VPRamon VPRamon self-assigned this Mar 7, 2026
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

Code Coverage

Package Line Rate Complexity Health
tempoch-ffi.src 66% 0
tempoch-core.src 99% 0
Summary 91% (1639 / 1810) 0

@VPRamon VPRamon merged commit bf6b341 into main Mar 7, 2026
5 checks passed
@VPRamon VPRamon deleted the doc branch March 7, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant