dynpatch-core

Crates.iodynpatch-core
lib.rsdynpatch-core
version0.1.0
created_at2025-10-15 10:50:55.946953+00
updated_at2025-10-15 10:50:55.946953+00
descriptionRuntime engine for dynpatch - dynamic library loading, ABI validation, and transactional patching
homepage
repositoryhttps://gitlab.com/TIVisionOSS/crates/dynpatch
max_upload_size
id1884177
size46,360
Eshan Roy (eshanized)

documentation

https://docs.rs/dynpatch-core

README

dynpatch-core

Runtime engine for safe live code reloading in Rust.

This crate provides the core functionality for dynamically loading, validating, and activating patches at runtime, with strong safety guarantees and transactional semantics.

Features

  • Dynamic library loading: Safe loading of .so/.dylib/.dll files
  • ABI validation: Strong type and layout compatibility checking
  • Transactional activation: All-or-nothing patch application with automatic rollback
  • Rollback stack: Maintain history and revert to previous versions
  • Lock-free swapping: RCU-like publication using arc-swap
  • Metrics: Optional performance and operation metrics

Optional Features

  • abi_stable: Enhanced ABI compatibility checks using the abi_stable crate
  • metrics: Enable detailed metrics collection
  • signing: Cryptographic signature verification for patches
  • sandbox: Process isolation for untrusted patches

Usage

use dynpatch_core::{init, reload, rollback, active_patch_info};

// Initialize the runtime
init();

// Load a patch
reload("path/to/patch.so")?;

// Check active patch
if let Some(info) = active_patch_info() {
    println!("Active patch: {} v{}", info.name, info.version);
}

// Rollback if needed
rollback()?;

License

MIT - See LICENSE file for details

Commit count: 0

cargo fmt