-
Notifications
You must be signed in to change notification settings - Fork 15
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
Adhere to Rust API Guidelines #8
Comments
Thanks for putting in this list. If anyone could help go through and point out problems they see that would be great; I don't have much free time for this right now. |
This is up my alley, but it's a big task. So I'm going to try to do some work on it, but that doesn't mean that I'm opposed to another person helping if they're interested . |
@Lytigas In the necessities section, we are non-compliant with If you refuse to consider changing the license (which IMO you should), you should strike through that item on the checklist and mark it WONTFIX. |
+1 to the note above. I feel GPLv3 isn't appropriate for a library, and given that this is essentially a derivative of a BSD project, the licensing is very odd. |
@Lytigas Any reply? |
For posterity I'll include here that the project has been re-licensed. |
One thing we'll have to get straight is whether our setters will be traditional C++ style or Rust-style |
I'm signing off on C-METADATA. |
@Lytigas, I think it would be better to take the rust approach since using rust is what this entire project is all about. Also, I have a feeling some clippy lints might complain about doing it the C++ way. |
WPILib have a lot of technical debt anyway. Trying to write idiomatic Rust should help us move away from that (which is the reason behind a couple of the open PRs here). |
I assume this issue still needs a bit of work, should I try to work on it a bit? I'm not great with Rust but this feels like a good place to learn. |
See https://rust-lang.github.io/api-guidelines/ for details.
as_
,to_
,into_
conventions (C-CONV)Methods on collections that produce iterators followiter
,iter_mut
,into_iter
(C-ITER)Iterator type names match the methods that produce them (C-ITER-TY)Copy
,Clone
,Eq
,PartialEq
,Hash
Ord
,PartialOrd
Debug
Display
Default
From
,AsRef
,AsMut
(C-CONV-TRAITS)Collections implementFromIterator
andExtend
(C-COLLECT)Serialize
,Deserialize
(C-SERDE)Send
andSync
where possible (C-SEND-SYNC)Hex
,Octal
,Binary
formatting (C-NUM-FMT)Generic reader/writer functions takeR: Read
andW: Write
by value (C-RW-VALUE)Item macros work anywhere that items are allowed (C-ANYWHERE)Item macros support visibility specifiers (C-MACRO-VIS)Type fragments are flexible (C-MACRO-TY)?
, nottry!
, notunwrap
(C-QUESTION-MARK)readme, keywords, categories
Smart pointers do not add inherent methods (C-SMART-PTR)Operator overloads are unsurprising (C-OVERLOAD)Deref
andDerefMut
(C-DEREF)bool
orOption
(C-CUSTOM-TYPE)bitflags
, not enums (C-BITFLAG)Debug
(C-DEBUG)Debug
representation is never empty (C-DEBUG-NONEMPTY)The text was updated successfully, but these errors were encountered: