corewlan
Safe Rust bindings for Apple's CoreWLAN framework on macOS.
Status: v0.2 ships the full class-based CoreWLAN surface across
CWWiFiClient,CWInterface,CWChannel,CWNetwork,CWConfiguration,CWMutableConfiguration,CWNetworkProfile,CWMutableNetworkProfile, andCWSecurity, backed by a Swift bridge built with SwiftPM.
Highlights
- Shared and ephemeral
CWWiFiClientaccess. - Read-only
CWInterface,CWNetwork,CWChannel,CWConfiguration, andCWNetworkProfilesnapshots. - Mutable configuration/profile builders via
CWMutableConfigurationandCWMutableNetworkProfile. - Interface mutators for power, channel, keys, association, enterprise association, and configuration commits.
- Rust delegate registration for
CWEventDelegatenotifications. - Typed wrappers for
CoreWLANenums, cipher flags, keychain utilities, error codes, and notification constants.
Quick start
use *;
Examples
The crate ships one numbered example per logical CoreWLAN area; see examples/ for the full list.
Notes
Interface::scan_for_networks_*wrappers call the blockingCoreWLANscan APIs.Interface::cached_scan_results()only returns the existing scan cache and does not initiate a scan.- SSID, BSSID, and country-code values may be unavailable without Location Services authorization.
- Association, power, key, and configuration commit APIs may require administrator privileges or Wi-Fi entitlements; the corresponding tests are marked
#[ignore].
Coverage and verification
- API audit:
COVERAGE.md - Validation command set:
cargo clippy --all-targets -- -D warningscargo testfor ex in examples/*.rs; do cargo run --example "$(basename "$ex" .rs)"; done
License
Licensed under either of Apache-2.0 or MIT at your option.