Hasty Briefsbeta

Bilingual

Subsecond: A runtime hotpatching engine for Rust hot-reloading

10 months ago
  • #Hot-Patching
  • #Rust
  • #Development-Tools
  • Subsecond is a Rust library enabling hot-patching for running applications without restarting, useful for game engines and servers.
  • Features ThinLinking for faster Rust compilation in development mode.
  • Usage involves calling functions with `subsecond::call` for automatic detouring to the latest version.
  • Requires a third-party tool like Dioxus CLI for loading patches, installed via `cargo binstall dioxus-cli`.
  • Operates via a jump table for function calls, avoiding direct memory modification for safety.
  • Currently supports patching only the 'tip' crate, with future plans for full workspace support.
  • Supports hot-reloading of globals, statics, and thread-locals with noted limitations.
  • Does not support hot-reloading of structs due to layout and alignment constraints.
  • Includes ThinLink, a fast linker for Rust, integrated into Dioxus CLI.
  • Platform support includes major OSes and WebAssembly, with some limitations like iOS devices.
  • Encourages framework authors to indicate Subsecond support with a badge.
  • Licensed under MIT, with support options via GitHub sponsorship.