Description
Environment
OS: macOS (Apple Silicon - arm64)
Architecture: arm64 (confirmed via uname -m)
ureq version: 3.0.11(tried 2.12.1 as well, same)
Rust version: rustc 1.86.0 (05f9846f8 2025-03-31)
Problem
ureq fails to compile on Apple Silicon Macs when using rustls features due to a compilation error in the ring crate dependency.
Steps to Reproduce
-
On Apple Silicon Mac, add ureq to Cargo.toml:
ureq = { version = "2.10", features = ["json", "rustls"] }
-
Run cargo check or cargo build
error[E0080]: evaluation of constant value failed --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.11/src/cpu/arm/darwin.rs:44:5 | 44 | assert!((CAPS_STATIC & MIN_STATIC_FEATURES) == MIN_STATIC_FEATURES); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: (CAPS_STATIC & MIN_STATIC_FEATURES) == MIN_STATIC_FEATURES' | error[E0080]: evaluation of constant value failed --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ring-0.17.11/src/cpu/arm/darwin.rs:51:5 | 51 | assert!(CAPS_STATIC == MIN_STATIC_FEATURES); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: CAPS_STATIC == MIN_STATIC_FEATURES error: could not compile "ring" (lib) due to 2 previous errors
Additional Context
This appears to be related to the ring crate's ARM64 feature detection on macOS. The issue is in ring v0.17.11's CPU capability assertions for aarch64-apple-darwin targets.