$ show Frodo45127/rpfm
Rusted PackFile Manager (RPFM) is a desktop application for modding Total War games. It provides comprehensive tools for opening, editing, and saving proprietary game pack files (.pack) and dozens of embedded binary formats (animations, models, sound banks, battle maps, UI layouts, etc.) across all major Total War titles from Empire to Warhammer 3. The application is built in Rust with a Qt6 frontend, using a client-server architecture where the UI delegates heavy file operations to a background server over WebSocket. It also exposes a headless server with WebSocket and MCP endpoints for AI tool integration. The codebase is modular, with separate crates for core library (`rpfm_lib`), extended features (`rpfm_extensions`), IPC protocol (`rpfm_ipc`), telemetry (`rpfm_telemetry`), and shared UI utilities (`rpfm_ui_common`). It includes custom C++ Qt widgets, a plugin scripting system (Lua/Python), and self-update capabilities.
The LLM identified 3 files worth highlighting for reuse:
Provides the `ReadBytes` and `WriteBytes` traits for endian-aware binary reading/writing of primitive types, strings, and vectors. These traits are used throughout all file format decoders and encoders. They are generic, well-tested, and depend only on `std::io`, making them directly reusable in any project that needs to parse or generate binary data.
Defines the typed IPC message protocol (`IpcMessage<Command>`, `IpcMessage<Response>`) with ID correlation for asynchronous request-response communication between the UI and server. The messages are serializable via serde (JSON) and include helper methods for constructing requests and matching responses. This pattern is isolated and can be reused in any system requiring a clean, type-safe IPC layer.
Contains the `clone!` macro which simplifies capturing cloned variables in Qt signal/slot closures. This macro is widely used across the UI to avoid boilerplate when connecting signals. It is a small but practical utility that can be extracted and used in any Rust project that works with callback-heavy APIs, especially Qt bindings.