You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add processor() method to UNameAPI trait
Implements processor type mapping to provide GNU coreutils-compatible
processor information, addressing uutils/coreutils#8659.
Changes:
- Add processor() method to UNameAPI trait with comprehensive docs
- Implement map_processor() helper in lib_impl for arch-to-processor mapping
- Add processor field and implementation to all platform modules (Unix, Windows, unknown)
- Include platform-specific tests verifying correct processor mappings
- Update example code to demonstrate processor() usage
- Add workspace declaration to Cargo.toml to prevent parent workspace inheritance
Processor mapping behavior:
- macOS: arm64 → arm
- Linux: aarch64 → aarch64 (passthrough)
- x86_64/amd64 → x86_64
- i386/i486/i586/i686 → i686
- ARMv6/v7/v8 variants → arm
- Unknown architectures pass through unchanged (better than "unknown")
This provides the foundation for uutils/coreutils to migrate from its
local processor mapping implementation, consolidating platform knowledge
in the appropriate abstraction layer.
Ref: uutils/coreutils#8659
* docs: update README to include processor() method
Add processor() to example code and expected output as requested by @sylvestre
* docs: clarify processor() vs machine() difference and add comprehensive tests
Address review feedback:
- Remove incomplete archive.is placeholder
- Add detailed documentation explaining how processor() differs from machine()
- Include comparison table showing platform-specific behavior
- Add comprehensive unit test for map_processor() covering all branches
- Improves test coverage from 66.66% to 100% in lib_impl.rs
0 commit comments