dynpatch-macro

Crates.iodynpatch-macro
lib.rsdynpatch-macro
version0.1.0
created_at2025-10-15 10:50:53.192694+00
updated_at2025-10-15 10:50:53.192694+00
descriptionProcedural macros for dynpatch - #[patchable], #[patch_impl], #[patch_trait]
homepage
repositoryhttps://gitlab.com/TIVisionOSS/crates/dynpatch
max_upload_size
id1884176
size9,920
Eshan Roy (eshanized)

documentation

https://docs.rs/dynpatch-macro

README

dynpatch-macro

Procedural macros for the dynpatch hot-patching system.

Macros

  • #[patch_trait] - Mark traits as patchable interfaces
  • #[patchable] - Mark functions/methods for hot-swapping
  • #[patch_impl] - Mark struct implementations as patches
  • #[patch_entry] - Mark patch initialization entry points
  • #[derive(HotConfig)] - Derive hot-reloadable configuration support

Example

use dynpatch_macro::*;

#[patch_trait]
pub trait Handler {
    fn handle(&self, request: Request) -> Response;
}

#[patchable]
fn process(data: &str) -> String {
    data.to_uppercase()
}

License

MIT - See LICENSE file for details

Commit count: 0

cargo fmt