ndn_faces/local/
mod.rs

1//! # `ndn_faces::local` — Local and IPC faces
2//!
3//! Face implementations for communication between applications and the NDN
4//! forwarder on the same machine.
5//!
6//! ## Key types
7//!
8//! - [`InProcFace`] / [`InProcHandle`] — in-process channel pair for library-embedded use
9//! - [`UnixFace`] — Unix domain socket face (unix only)
10//! - [`IpcFace`] / [`IpcListener`] — cross-platform IPC (Unix sockets on unix,
11//!   named pipes on Windows)
12//! - [`ShmFace`] / [`ShmHandle`] — shared-memory face for zero-copy local
13//!   transport (requires `spsc-shm` feature)
14
15#![allow(missing_docs)]
16
17pub mod in_proc;
18pub mod ipc;
19
20#[cfg(unix)]
21pub mod unix;
22
23#[cfg(all(
24    unix,
25    not(any(target_os = "android", target_os = "ios")),
26    feature = "spsc-shm"
27))]
28pub mod shm;
29
30pub use in_proc::{InProcFace, InProcHandle};
31
32/// Alias for [`InProcFace`]: the in-process app-to-engine face backed by
33/// `tokio::sync::mpsc` (zero syscalls, same-thread or cross-thread).
34pub type AppFace = InProcFace;
35pub use ipc::{IpcFace, IpcListener, ipc_face_connect};
36
37#[cfg(unix)]
38pub use unix::{
39    UnixFace, unix_face_connect, unix_face_from_stream, unix_management_face_from_stream,
40};
41
42#[cfg(all(
43    unix,
44    not(any(target_os = "android", target_os = "ios")),
45    feature = "spsc-shm"
46))]
47pub use shm::{ShmError, ShmFace, ShmHandle};