Skip to main content

Module hotpatch

Module hotpatch 

Source
Expand description

Tier 1 (subsecond) hot-reload pipeline.

See docs/hot-reload-plan.md for the architecture. The modules land one per task ID:

  • symbol_table (I4g-1): parse ELF / Mach-O symbol tables
  • jump_table (I4g-2): diff old vs new symbol tables
  • cache (I4g-3): hold the original module’s parsed table
  • wrapper (I4g-4): rustc + linker hijack
  • thin_build (I4g-5): partial rebuild driver
  • Patcher (I4g-6): the integrated Change → JumpTable API

Re-exports§

pub use cache::HotpatchModuleCache;
pub use jump_table::build_jump_table;
pub use jump_table::DiffReport;
pub use jump_table::PatchPlan;
pub use link_plan::linker_os_for_host;
pub use link_plan::LinkPlan;
pub use link_plan::LinkerOs;
pub use patcher::Patcher;
pub use runner::run_obj_plan;
pub use runner::thin_rebuild_obj;
pub use shim_paths::expected_shim_paths;
pub use shim_paths::resolve_shim_paths;
pub use shim_paths::ShimPaths;
pub use stub_object::build_stub_for_needed;
pub use stub_object::compute_needed_symbols;
pub use stub_object::compute_needed_symbols_multi;
pub use stub_object::create_undefined_symbol_stub;
pub use symbol_table::parse_symbol_table;
pub use symbol_table::SymbolInfo;
pub use symbol_table::SymbolTable;
pub use thin_build::build_obj_plan;
pub use thin_build::library_filename;
pub use thin_build::object_filename;
pub use thin_build::ObjBuildPlan;
pub use validate::ensure_target_supported;
pub use validate::extract_target_triple;
pub use validate::validate_environment;
pub use wrapper::default_cache_dir;
pub use wrapper::default_linker_cache_dir;
pub use wrapper::load_captured_args;
pub use wrapper::load_captured_linker_args;
pub use wrapper::resolve_host_linker;
pub use wrapper::run_fat_build;
pub use wrapper::CapturedLinkerInvocation;
pub use wrapper::CapturedRustcInvocation;
pub use wrapper::LinkerCaptureConfig;

Modules§

android_ndk
Android NDK toolchain resolution for the hot-patch link step.
cache
Cached snapshot of the original binary’s symbol table.
jump_table
Build a subsecond::JumpTable from old vs new symbol tables.
link_plan
Build the linker invocation for a hot-patch dylib by editing the captured fat-build linker call (see I4g-X1 whisker-linker-shim) as little as possible.
patcher
Patcher — the integrator. Turns a crate::Change into a subsecond_types::JumpTable (wrapped in PatchPlan) by stitching together the pieces from I4g-1 through I4g-X2:
runner
Spawn-side companions to super::thin_build::build_obj_plan and super::link_plan::build_link_plan.
shim_paths
Resolve the on-disk paths of whisker-rustc-shim and whisker-linker-shim for the dev session.
stub_object
Build a “stub” object file that defines every symbol the patch references but doesn’t itself supply. Each defined-here-only-for- the-patch symbol resolves to a tiny assembly trampoline that branches to the corresponding runtime address in the live host process.
symbol_table
ELF / Mach-O symbol-table parser.
thin_build
Thin-rebuild driver — produce a patch dylib from a single captured rustc invocation by editing as few of its args as possible.
validate
Pre-flight environment check for the thin-rebuild pipeline.
wrapper
Fat-build runner + captured-args loader.