On Wed, Jan 29, 2014 at 5:35 PM, Patrick Walton <[email protected]> wrote: > On 1/29/14 1:12 PM, Daniel Micay wrote: >> >> On Wed, Jan 29, 2014 at 3:59 PM, Tony Arcieri <[email protected]> wrote: >>> >>> On Wednesday, January 29, 2014, Olivier LEMAIRE <[email protected]> >>> wrote: >>>> >>>> >>>> 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 >>> stdlib. >>> >>> 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. > > Patrick
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). _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
