On 20/02/2012 5:38 AM, Jeffery Olson wrote:
(whoops. didn't go to list)

it would be cleaner and more maintainable to design it in two layers. Others 
have disagreed with me on this before though.

My one gripe with this, and it was exposed in your email on c->rust
mapping, is that you end up defining various libuv data structures in
rust (including stuff defined in UV_HANDLE_PRIVATE_FIELDS), which
strikes me as brittle, from a long-term maint. perspective. An elegant
solution to address this doesn't really occur to me (header
file/#define parsing in rustc?).

Yeah. We're going to have to do something about that kind of muddle eventually. I suspect it'll involve the clang bindings erickt has been poking around with, possibly driven by a syntax extension or attribute plugin, when we support those.

(Alternatively a bindings-generation tool. As usual, some tension between "compiler plugin" and "secondary tool". A design rule of thumb to differentiate the two has not yet become clear to me.)

-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to