youki-dev / oci-spec-rs

OCI Runtime, Image and Distribution Spec in Rust
https://crates.io/crates/oci-spec
Apache License 2.0
218 stars 52 forks source link

Remove conditional compilation of spec fields #247

Closed burgerdev closed 3 weeks ago

burgerdev commented 4 weeks ago

What type of PR is this?

/kind api-change

What this PR does / why we need it:

The spec objects are not platform-dependent. There are fields that are not applicable for certain runtime environments, but they should still be available to programs that are not runtimes. Runtime implementations are free to ignore fields they can't process.

Which issue(s) this PR fixes:

Fixes #243

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Added `POSIXRlimit` struct and related fields in the `Process` struct for platforms other than Linux. Users on these platforms (notably Darwin and Windows) may need to add the new field to instantiation statements.
codecov-commenter commented 4 weeks ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 29.02%. Comparing base (57570dd) to head (d379e0b). Report is 74 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #247 +/- ## ========================================== + Coverage 26.61% 29.02% +2.41% ========================================== Files 24 26 +2 Lines 2788 3135 +347 Branches 1516 1668 +152 ========================================== + Hits 742 910 +168 - Misses 948 1004 +56 - Partials 1098 1221 +123 ```