1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Device module - Hardware capability detection and device-specific functionality.
//!
//! This module provides unified hardware capability detection across platforms,
//! including GPU acceleration, neural network APIs, battery level, and thermal state.
//!
//! ## Module Organization
//!
//! The device module is organized into focused submodules:
//!
//! | Module | Purpose |
//! |--------|---------|
//! | [`types`] | Data types (HardwareCapabilities, enums) |
//! | [`common`] | Cross-platform detection (memory, CPU) |
//! | [`apple`] | Apple platform detection (Metal, CoreML, Neural Engine) |
//! | [`android`] | Android platform detection (NNAPI, API level) |
//! | [`capabilities`] | Main detection logic and re-exports |
//!
//! ## Usage
//!
//! ```no_run
//! use xybrid_core::device::{detect_capabilities, HardwareCapabilities};
//!
//! let capabilities = detect_capabilities();
//! println!("GPU available: {}", capabilities.has_gpu());
//! println!("Memory: {} MB", capabilities.memory_total_mb());
//! ```
// Core types
// Cross-platform detection (memory, CPU)
// Platform-specific detection
// Main detection logic
// Telemetry-facing device profile (chip, RAM, OS, for wire events)
// Per-inference resource monitor + sampler.
// See `docs/sdk/resource-telemetry.md` for the public contract.
// Platform-bridged signals (battery, thermal) — consumed by `resource`.
// Platform tests
// Re-exports for convenience
pub use detect_capabilities;
pub use ;
pub use DeviceProfile;
pub use ;
pub use ;