[rust-dev] Moving libcrypto back into rust repo?
danielmicay at gmail.com
Wed Jan 29 14:45:40 PST 2014
On Wed, Jan 29, 2014 at 5:35 PM, Patrick Walton <pcwalton at mozilla.com> wrote:
> On 1/29/14 1:12 PM, Daniel Micay wrote:
>> On Wed, Jan 29, 2014 at 3:59 PM, Tony Arcieri <bascule at gmail.com> wrote:
>>> On Wednesday, January 29, 2014, Olivier LEMAIRE <olivier.lemaire at me.com>
>>>> I suggest to submit a call/request (Rust wiki?) to find this team
>>>> member/role as crypto is damn needed in this digital age.
>>> I'd suggest Rust continue its current policy of keeping crypto out of
>>> However, it'd be nice if there were an official "blessed" crypto package
>>> (using TBD packaging system). I think this library should/needs to be
>>> shipped with said TDB packaging system.
>>> Perhaps Mozilla could loop in its NSS people on rust-nss?
>> I don't think it's possible to make a nice NSS binding because it
>> depends on thread-local initialization. Green tasks may move between
>> threads so a context object is necessary. Other libraries don't have
>> this problem and a nicer interface can be exposed.
> What's wrong with a context object? Rust supports OO method dispatch syntax,
> so context objects look and feel quite idiomatic.
It's more painful than the same API without a context object, whether
or not it feels idiomatic. It seems like NSS actually requires a
single *global* initialization at the moment, but it's the same kind
of problem (some other cryptography libraries use thread-local state
and NSS may do it too).
More information about the Rust-dev