onkoe / ghr

A Global Hardware Report (mostly to help me find laptops that are cool)
Mozilla Public License 2.0
1 stars 0 forks source link

Feature gate `libghr` crate's info gathering functionality #3

Open onkoe opened 2 weeks ago

onkoe commented 2 weeks ago

The libghr crate currently contains numerous types used on the backend to forward to the frontend.

However, it makes no sense to compile all those info-gathering crates for the server side of things.

We should split out this functionality into another crate, or maybe just a feature flag. I generally prefer using a crate, as this limits the complexity of our Cargo features, but this would likely violate the orphan rule. (can't impl for external types)

This also duplicates the serde/syn builds, which may require different features, and thus, double the build times! Still, this may be worth it.

onkoe commented 1 week ago

this is still true with shared. preferable to have a feature here.

note that libghr/examples currently takes the vast majority of the cargo check time, as reqwest is pretty big. consider removing the pastebin example or making it's features optional. (but that second part's not really possible rn)