[noise] A more idiomatic Rust implementation

Tony Arcieri bascule at gmail.com
Tue Feb 21 14:44:38 PST 2017


On Tue, Feb 21, 2017 at 11:51 AM, Trevor Perrin <trevp at trevp.net> wrote:

> I sort of wanted Screech to be a zero-allocation library, but probably
> the code is cleaner when you use vectors.


One alternative that lies somewhere in the middle is using allocators:

https://doc.rust-lang.org/book/custom-allocators.html

With something like alloc_system, you get a nice wrapper for calling into
the system malloc(), but can still remain compatible with #![no_std] usage
(for e.g. embedded use cases)

That said, one would hope Vec will wind up (back) in ::core soon now that
allocators are stable

-- 
Tony Arcieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://moderncrypto.org/mail-archive/noise/attachments/20170221/824e8589/attachment.html>


More information about the Noise mailing list