Non-bundle option
elmarco opened this issue · comments
Hi,
While it is nice to bundle usb-ids for non-Linux/gnu platforms, many of them still ship with an up to date usb.ids (generally located at /usr/share/hwdata/usb.ids
). Would you consider an option to turn loading of data from this file at run time in this case?
thanks
Hmm. I'm not opposed to that, but it would require a pretty substantial refactor of the crate (it's entirely code-generated at the moment, and provides &'static
lifetimes for almost all resources).
A good compromise might be to retain the current code generation approach, but use a local copy of usb.ids
if present when a specific feature is used (maybe "distro-usb-ids"). Thoughts?
Yes, I think a distro-usb-ids feature could do the job. I imagine it will need quite some refactoring to get it done and still share most of the parsing code and user visible API. If you are not opposed, and not going to work on that any time soon, I will eventually look at it.
Sounds good to me!