Subsecond: Sub-Second Hot-Patching for Rust
2025-06-25
Subsecond is a Rust library enabling hot-patching, allowing code changes in a running application without restarts. This is invaluable for game engines, servers, and long-running apps where the edit-compile-run cycle is too slow. It also introduces 'ThinLinking', dramatically speeding up Rust compilation in development. Subsecond works by detouring function calls via a jump table, avoiding unsafe memory modification. An external tool compiles changed code, sends it to the application, and Subsecond applies the patch. Currently, it only patches the 'tip' crate and has limitations regarding globals, statics, thread-locals, and struct layouts. It supports major platforms, excluding iOS devices due to code signing.
Read more
(docs.rs)