On Mon, Feb 20, 2012 at 10:17 AM, Graydon Hoare <[email protected]> wrote:
> So the easiest way to write a friendly library binding, it seems, is to > write a minimal (as minimal as possible) binding to the C part, and then do > a second layer, in rust, that does that translation-down from rust-friendly > form. This is what we're going to be doing as we redo the libc / os > interface. > This makes sense. I would be willing to help on the libuv bindings front, but let me get this straight before I go any further. An ideal setup of the low-level/high-level system would look like this: std::uv - low-level bindings to the libuv C API. std::event/std::ev - high-level bindings to the event loop part (timers and such) of std::uv. std::fs - high-level bindings to fs functions of std::uv as well as other filesystem functions. std::net - high-level bindings to the networking parts of std::uv as well as other networking functions. Or am I misinterpreting how you would ideally like it set out? P.S. Incase anyone misunderstood, I wasn't challenging this decision, just trying to understand why exactly that way was best. P.S.S. I would suggest that std::net IPv6 parsing and formatting uses the libuv wrapper for this, because IPv6 addresses are very complicated and using a low-level function for it that handles the many shortcuts in the addresses would work better.
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
