Re: [rust-dev] Casting *c_uchar to *c_char

2014-05-13 Thread Christophe Pedretti
So, if i understand correctly, using CString::new with 'false' as a second argument implies : - as you have no control on the lifetime underlying buffer, generally, you have to as_str() and clone() the CString (the exception is when you use immediately (right after creation) and only once the

Re: [rust-dev] Cryptography Library

2014-05-13 Thread Kevin Cantu
A bit of everything sounds like a good summary. IIRC no cryptographer is working full-time to contribute to Rust, so there are no plans to put more crypto than needed into standard libraries. But serious libraries are more than welcome, and feedback would be great as we get ever closer to

Re: [rust-dev] Cryptography Library

2014-05-13 Thread Tony Arcieri
On Tue, May 13, 2014 at 1:52 AM, Kevin Cantu m...@kevincantu.org wrote: IIRC no cryptographer is working full-time to contribute to Rust, so there are no plans to put more crypto than needed into standard libraries. It'd be great if Mozilla could loop in their security team on Rust

[rust-dev] How to translate and use a void(*)(void*) in Rust ?

2014-05-13 Thread Christophe Pedretti
Hi all, SQLITE is defining the following C function : int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*)); How to include it in an extern block ? I have tried this fn sqlite3_bind_text(pStmt : *mut(), iCol : c_int, value : *c_char, n : c_int, f : *proc(*())) - c_int;

Re: [rust-dev] how to capture de-reference to ~int

2014-05-13 Thread Alex Crichton
The ~int type has since moved to Boxint, which will one day be a library type with Deref implemented on it (currently it is implemented by the compiler). Regardless, there's no need to implement the Deref trait for the type today, the compiler already takes care of it. For example, your code will

Re: [rust-dev] how to capture de-reference to ~int

2014-05-13 Thread Noah Watkins
On Tue, May 13, 2014 at 2:19 PM, Alex Crichton a...@crichton.co wrote: The ~int type has since moved to Boxint, which will one day be a library type with Deref implemented on it (currently it is implemented by the compiler). Thanks for the note. I'm using a slightly older version that doesn't