rksm / hot-lib-reloader-rs

Reload Rust code without app restarts. For faster feedback cycles.
MIT License
577 stars 21 forks source link

Allow specifying `crate = "something::hot_lib_reloader"` on hot_module! for when library is not a direct dependency #27

Closed izissise closed 1 year ago

izissise commented 1 year ago

Hello, In order to make it possible to re-export hot_lib_reloader and use hot_module derive, a new parameter crate should be added, to specify the crate name in the context where the proc-macro is called.

I found other example of this in serde and tokio https://github.com/serde-rs/serde/blob/1fcda0ebdb2cfa050df42fded93ba07c14e4b683/test_suite/tests/test_serde_path.rs#L6

https://docs.rs/tokio/latest/tokio/attr.main.html#rename-package