Automatically generated crates

I just published another version of fmap, and when wanting to check if docs.rs generated my documentation correctly, I noticed a bunch of crates being in the queue:

Did you ever experience the same when waiting for docs.rs to generate your documentation?

Those atsam… crates seem to be automatically generated. I wonder: Is this idiomatic? Wouldn't it be better to make a single crate and use feature flags? I'm curious whether there is a reason to create a lot of different crates in an automated fashion.

Maybe when using feature flags, docs.rs can't create the documentation properly (for all features)?

These are generated from SVD files describing these devices by svd2rust, and there's a different SVD file for each.

I don't think it would make sense to use feature flags for this - it seems like it would be much more complex to generate, and it's not typical to support more than one at once.

1 Like

If someone's crate collection is blocking the build queue, it should probably be reported in the docs.rs chatroom. They can manually de-prioritize it.

Oh, thanks to let me/us know. I didn't know it was possible and/or being done.

Anyway, it wasn't a big problen for me. Just a bit of impatience. :grin:

I was mostly wondering if it would bloat the registry (maybe not a problem?) and if it was good practice, or if there are better alternatives to generate a lot of packages and upload them. E.g. couldn't the code be generated on demand by a single build-dependency instead? Say I want to target controller X, then the svd2rust runs on my system for that particular controller X?


(But again, just asking out of curiosity. There may be good reasons to have these as a ready-to-use crate.)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.