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
//! FFI (Foreign Function Interface) for mobile platforms.
//!
//! This module provides C-compatible functions that can be called from
//! Android (via JNI) and iOS (via Swift/ObjC).
//!
//! # Android Usage
//!
//! ```kotlin
//! // Load native library
//! System.loadLibrary("shoes")
//!
//! // Declare native methods
//! external fun shoesInit(logLevel: String): Int
//! external fun shoesStartTun(
//! fd: Int,
//! configYaml: String,
//! protectCallback: (Int) -> Boolean
//! ): Long
//! external fun shoesStop(handle: Long)
//! ```
//!
//! # iOS Usage
//!
//! ```swift
//! // Initialize
//! shoes_init("info")
//!
//! // Start VPN
//! let handle = shoes_start(configYaml, protectCallback)
//!
//! // Stop VPN
//! shoes_stop(handle)
//! ```
//!
//! # Thread Safety
//!
//! - `shoes_init` must be called once before any other function
//! - `shoes_start` / `shoes_start_tun` starts a background thread for the TUN service
//! - `shoes_stop` signals shutdown and waits for cleanup
// Common utilities shared between iOS and Android
pub use *;
pub use *;
// Re-export for non-mobile platforms (stub implementations)
pub use *;