-
Notifications
You must be signed in to change notification settings - Fork 133
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
How to compose with configuration flags ? #316
Comments
Thanks for pointing the discussion out ! So we use the aes blockcipher in a csprng (see concrete-csprng), and we want to expose multiple objects, which all implement the csprng api (defined by a trait in our crate). Each of those objects represent a specific implementation, and it is important for us to give the ability to the user to know for sure which implementation is getting used at run-time (basically, which one of those objects is used). This is part of our api: we do not take decisions on users behalf. I am not sure I completely understand the details of #245, but I would say it is sad that the transfer of the From my (very) limited understanding of the library, the Anyhow, this is just an humble opinion 😉 I obviously don't have all the constraints of the library in mind, and I am sure you guys all try to make the things as best as possible ! |
Why do you want to expose separate variants like Users will be able to remove the AES-NI backend or force it using the configuration options, but I don't think it should be concern for your library. |
I don't agree that the underlying implementation does not matter to all users. In our case, here are a few reasons:
Anyway, I guess you already answer my question about whether or not this was possible. Thanks for the explanations ! |
The first point is handled well with the configuration options. For reference you could take a look at our CI. The second point, unfortunately, will not work with the current state of Rust. For example, the AES-NI based implementation requires that the |
Hello 🙂
I am currently trying to transition from a dependency on
aes_soft
to theaes
crate. I would like to make sure that I am using the software variant of the blockcipher, and not the aesni version.I saw that you transitioned from feature flags to configurations in #284 . Before that I would have used a dependency like:
With the new way, I don't know how to do 😕. Is there a way to have the same behavior?
Also, out of curiosity, I tried to understand the rationale of this decision but could not find any good points to that. Could you quickly explain what made you move to this configuration approach ?
Thanks !
The text was updated successfully, but these errors were encountered: