-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional typenum-macro that provides tyint and tyuint (resolves #131) #136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, sorry I have been unresponsive. I did not have the mental energy to look at this repo for a while there.
This is really cool! It would be neat to combine it with the op!
macro, but I'm happy to leave that to a later time.
My only concern is that I've never managed a multi-crate repo before. Will crates.io allow publishing a crate with a local optional dependency like this? And, if so, if one depends on typenum from crates.io, will that dependency work?
Or do we need to publish the macro crate separately, and then rely on its crates.io version, to make this happy with the Crates ecosystem?
35fa60d
to
7236859
Compare
Both tyint tyuint are convenient macros to convert integer literals into typenum types.
7236859
to
4ed5413
Compare
I made some changes to get ready for merge.
The splitting of multi-crate is due to the limitation of procedure-macro. You'll have to publish both of the crates to crates.io. Make sure uploading the typenum-macro before typenum and the version matches. The path is fine here. You can see an existing example in tch-rs (link). |
Thanks again for this and sorry for the delay. I'm going to merge it, and try to see if I can incorporate the Edit: Because it makes typenum unpublishable for now, I'm going to merge it to a new branch. |
Is it still not ready for merge to main branch? If there are some problems prevent from merge, please tell me. I try to fix them. |
The only issue is that the |
Created an issue to track it: #188 |
Thanks for your reply! |
This PR provides
tyint
andtyuint
convenient macros to convert integer literals into typenum types, signed and unsigned versions respectively.It adds an optional feature
macros
to let users optionally include these macros.