Skip to main content

imessage_private_api/
lib.rs

1/// Private API TCP service: communication layer between the imessage-rs server
2/// and the DYLD_INSERT_LIBRARIES-injected helper dylib running inside Messages.app.
3///
4/// Wire protocol: newline-delimited JSON over TCP on localhost.
5/// Port: 45670 + (uid - 501), clamped to [45670, 65535].
6pub mod actions;
7pub mod events;
8pub mod injection;
9pub mod service;
10pub mod transaction;
11
12/// The compiled helper dylib bytes, embedded at build time.
13/// Written to disk at runtime for DYLD_INSERT_LIBRARIES injection.
14#[cfg(target_os = "macos")]
15pub static HELPER_DYLIB: &[u8] = include_bytes!(env!("HELPER_DYLIB_PATH"));
16
17#[cfg(not(target_os = "macos"))]
18pub static HELPER_DYLIB: &[u8] = &[];