hecatia-elegua / bilge

Use bitsized types as if they were a feature of rust.
Apache License 2.0
171 stars 17 forks source link

Allow user to define their own `-Bits` derive macros #34

Closed gwendalF closed 1 year ago

gwendalF commented 1 year ago

Resolves #11. @hecatia-elegua I tried to do it this way. I would like to have more informations regarding the tooling used by the project. (I had some issue with formatting). Do you know if there are crates with already some Bits macros? I would like to test it properly, or if you have idea of some macros?

hecatia-elegua commented 1 year ago

Thank you! I don't know about formatting, I'm not using rustfmt here.

There are no crates with -Bits macros, that's what we want to enable with this change. But for example, DebugBits and TryFromBits could be factored out into other crates. You could test if DebugBits still works if you factor it out, not sure why it wouldn't, though. I'm also not sure if that would increase or decrease compile times in this case.

hecatia-elegua commented 1 year ago

Oh and I would be ready to merge this in, but I think you have the wrong github account linked to the commit.

gwendalF commented 1 year ago

@hecatia-elegua , I made the update for the files organisation. Sorry for the force push. It should be Ok now

hecatia-elegua commented 1 year ago

Force pushing is okay, especially on small PRs or when restructuring commits. Looks like everything works! There are some whitespace-only changes and file ending issues, but I can fix those myself / they don't matter and waste time.

hecatia-elegua commented 1 year ago

Sorry, it took a while to come back to this.