ice-rpc 0.3.2

RPC over iceoryx2 shared memory: zero-copy header, rkyv payload, reconnection, discovery and more
Documentation
//! Internal facade consumed by the code generated by `ice-rpc-macros`.
//!
//! Groups the runtime internals the `#[service]` macro depends on, so the
//! stable public API of `ice-rpc` stays small. `#[doc(hidden)]`, and **not**
//! part of the public API: its symbols are semver-exempt for the consumers of
//! `ice-rpc`, but **not** for `ice-rpc-macros`.

// ── Node liveness ───────────────────────────────────────────────────
pub use crate::node_liveness::{
    is_pid_alive, is_provider, mark_provider, register_node_liveness_watcher,
    unregister_node_liveness_watcher, LIVENESS_POLL_MS,
};

// ── Shutdown ────────────────────────────────────────────────────────
pub use crate::shutdown::{clear_ipc_cleanup, register_ipc_cleanup};

// ── Rx vocabulary, wire header and name limits ──────────────────────
pub use crate::types::{
    call_scoped, channel, fmt_correlation_id, local_call_scoped, next_correlation_id, now_ns,
    raw_pid_to_u32, service_id_of, unbounded_channel, CallContext, EventKind, NodeId, RpcError,
    RpcHeader, Sender, ServiceRef, WireEvent, CORRELATION_ID_LEN, METHOD_NAME_LEN,
    PROTOCOL_VERSION, SERVICE_NAME_LEN,
};

// Canonical terminals behind the inherent `Observable` methods.
pub use crate::types::{collect_values, first_event};

// ── Service traits implemented by the generated code ────────────────
// `ServiceInit` stays public: it is the only one a developer implements.
pub use crate::service_traits::{HttpCallable, ServiceConsumer, ServiceLifecycle, ServiceNamed};

// ── Bootstrap / configuration ───────────────────────────────────────
pub use crate::config::setup_iceoryx2_global_config;

// ── Lifecycle ───────────────────────────────────────────────────────
// Escape hatch for contexts the macros cannot cover (N-API gateway, tests).
pub use crate::{
    global_cancel_token, init, init_without_ctrl_c, shutdown_and_release, wait_for_shutdown,
    ShutdownGuard,
};

// ── Plumbing invoked by the generated entry points ──────────────────
pub use crate::{_ProviderService, registry_cancel_token, run_provider_inner};

#[cfg(feature = "http")]
pub use crate::start_http_server;

// ── Publish/subscribe transport ─────────────────────────────────────
// Entry points used by the generated client/server.
pub use crate::transport::{
    decode_aligned, emit_rpc_error, native_call, observable_to_responses, register_native_service,
    serialize_and_call, spawn_native_service, start_registered_channels, sweep_orphan_shm_markers,
    BoxResponseFuture, CollectEmitter, OwnedEmitter, ResponseEmitter, ServiceDispatcher,
};

// ── Dependency re-exports used by the generated code ────────────────
// No `futures` here: the codegen never named it, and the oneshot channel it
// used to provide now lives in `ice-rpc-rx::rt::oneshot`.
pub use async_channel;
pub use async_lock;
// The Node.js converters are the only generated code that names `base64`, and
// they are emitted only under the `nodejs` feature — which enables the
// dependency, so this re-export follows the same switch.
#[cfg(feature = "nodejs")]
pub use base64;
pub use futures_lite;
pub use iceoryx2;
pub use log;
pub use rkyv;
pub use serde_json;