Open
Description
It would be nice if you didn't have to specify a custom class name in define_class!
.
Maybe we can generate it with something like:
const NAME: &'static str = concat!(module_path!(), "::", $struct_name, env!("CARGO_PKG_VERSION"));
This also ties in to ryanmcgrath/cacao#63 and rust-windowing/raw-window-metal#29; if we have a unique name based on the package, it would probably be sound to look up the name from the runtime instead of always trying to declare it ourselves.
(Though a bit unsure, can two Cargo packages with SemVer compatible versions ever be different? Maybe in the plugin case, where two classes are loaded dynamically at runtime, and one of them comes from a modified Git dependency where the other one doesn't? But maybe we can just say that that's up to the user to ensure is sound?).
Activity