Replies: 2 comments
-
|
Adding to the as-I-go list:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@ionut-arm mentioned wanting a roadmap to be able to plan around features and changes I may be submitting. I don't think I can do that in any comprehensive way because I'm a bit more opportunistic than that, just changing the thing that was in my way most recently. But I can at least try to collect ideas here that have crossed my mind.
In general I've been working from the bottom up, trying to work out the details of the low-level types first and moving gradually in the direction of the main library API.
Next-ish:
thiserrorto clean up theErrortype.Errorstrings to be more context-specific. (i.e, Two errors with the same source type aren't necessarily the same).derivativecrate. Its only used in one place where a customDebugimpl will do. My real motive, though, is that it does some things that make rust-analyzer incorrectly mark it with a red squiggly, which is annoying. 😛AttributeTypein favor of justAttribute.CKA_VENDOR_DEFINEDand set a general pattern for other vendor definitions.Datetype to resemble theUtcTimetype in Info flags refactor #68. Likely also move it out oftypesand intoobjectsince it isn't used elsewhere."As I go" items I'll change as I encounter them but are too spread out for their own PR:
FromorTryFromconversion at the struct level rather than converting inside getters.MyStruct{ var: CK_ULONG }should just beMyStruct(CK_ULONG).Fromfrom docs and replacing the largestringifyblocks with Debug impls of Rust types.typesmodule. For instance, I put theMaybeUnavailabletrait there because I thought it might need use in multiple places. But if that doesn't materialize, it should be moved back nearTokenInfo, the only place it's used now.Bigger, speculative ideas that may become more or less unrealistic as other changes progress:
ThingandThingInfotype pairs. It's strange that many types have a secondary info type. To just have something that can act as both a handle/ID as well as describe itself seems much more intuitive. (Slotlooks especially absurd in this regard.) I haven't thought through all the implications of such a change, though. For one, it would make allget_infokinds of calls implicit whenever the thing being described is constructed. Also, any dynamic state (e.g., clock value) would have to be managed in a new way. Lots of other stuff I'm probably not thinking of, too.Arcof lib to spread context callback access into other types. Use lifetime of theSessionthat provides them to prevent use after close.use cryptoki_sys::*globs with an explicit list of bindings. This is more curiosity than anything. I'd like to dig into how the import process works and whether there's anything to be gained by not having this massive file fully in scope.Beta Was this translation helpful? Give feedback.
All reactions