On 06/04/13 03:13, Andres Osinski wrote:
I just wanted to know if anyone was familiar with the FCGI protocol, and if there's any reference as to how to manage the packing and unpacking of C data structures, as well as if you know of any implementation for a similar protocol.

One small question that I have is that FCGI protocol defines a struct with two char arrays whose length is defined by another field within the struct, and I was wondering how that would be modeled in Rust.

It's my understanding that Rust structures are compatible with C structures. If so, you won't need to pack/unpack: just define a struct, read/write it, and access the elements. Data validation is still important, of course.

http://static.rust-lang.org/doc/tutorial.html#data-structures


--
Lee

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to