Skip to main content

Crate rpfm_ipc

Crate rpfm_ipc 

Source
Expand description

§RPFM IPC - Inter-Process Communication Protocol

This crate defines the protocol used between RPFM’s clients (the UI, MCP clients and scripts) and the backend server (rpfm_server), and the settings both sides share.

§Protocol Overview

Clients call typed methods of the server over JSON-RPC 2.0, sent as WebSocket text frames:

  1. The client sends an api::RpcRequest with a unique ID, a method name like table.rows, and its params.
  2. The server answers with an api::RpcResponse with the same ID, holding the result or an api::ApiError.
  3. Long methods run as jobs: they answer right away with a job ID, and report their progress and result in job.updated notifications.

Each method is a struct implementing api::Request, which ties it to its name and response type.

§Modules

Modules§

api
The server API: typed methods over JSON-RPC 2.0.
helpers
IPC Helpers Module
settings
Persistent settings store and config-path helpers.
settings_keys
Typed constants for all settings keys used across the application.