hotpatch icon indicating copy to clipboard operation
hotpatch copied to clipboard

Question: Current state of Rust hotpatching

Open Jvlegod opened this issue 3 months ago • 5 comments

Hello, I’m exploring hot-patching in Rust and have two main questions:

  • It seems so far most work (including this crate) is focused on replacing libraries / shared-objects at runtime, rather than performing full binary patching of ELF executables (i.e., parsing an ELF, rewriting code sections, redirecting functions inside a compiled binary). I’d like to confirm: is that understanding correct? Are there technical/ABI/security reasons why library-level hot-replacement is what’s currently feasible, and full ELF-binary patching is much harder (or not supported) in Rust?

  • I came across RFC 2375 (https://github.com/rust-lang/rfcs/pull/2375 ) in the context of Rust language changes. Could you help clarify where it stands now? Is the RFC accepted/merged, postponed, or still under discussion? If relevant, how this might affect hot-patching support in Rust going forward.

Thanks for any pointers or guidance.

Jvlegod avatar Nov 19 '25 06:11 Jvlegod