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
/// Build script for r-resources
///
/// This build script generates Rust code from XML resource files at compile time.
/// It reads `res/values.xml` from the project root and generates type-safe constants
/// for all defined resources.
///
/// # Resource Types
///
/// Supported resource types:
/// - `<string>`: String constants
/// - `<int>`: Integer constants (i64)
/// - `<float>`: Float constants (f64)
/// - `<string-array>`: String array constants
/// - `<int-array>`: Integer array constants
/// - `<float-array>`: Float array constants
///
/// # Example
///
/// Given this `res/values.xml`:
///
/// ```xml
/// <?xml version="1.0" encoding="utf-8"?>
/// <resources>
/// <string name="app_name">My App</string>
/// <int name="max_retries">3</int>
/// </resources>
/// ```
///
/// The build script generates:
///
/// ```rust
/// pub mod string {
/// pub const APP_NAME: &str = "My App";
/// }
///
/// pub mod int {
/// pub const MAX_RETRIES: i64 = 3;
/// }
/// ```