On 06/02/2012 9:18 AM, Jeffery Olson wrote:
I'd be interested to here your thoughts and any existing plans about this.
Sure!
- Rust has a 3-layer standard library:
- librustrt, C++ code implementing language primitives and
OS wrappers we can't figure out how to do in rust yet.
- libcore, rust code imported-and-linked by default with all
crates (unless you explicitly ask to omit it).
- libstd, larger blobs of library code that are less certain to
be used by "all reasonable programs".
- The core/std rationale is explained elsewhere:
https://mail.mozilla.org/pipermail/rust-dev/2011-December/001037.html
- We provide, and will continue to provide, direct bindings to
synchronous libc IO functions (fopen, fread, etc.) in libcore,
but these are mostly for "simple cases". We're assuming more
complex IO scenarios will want to switch to uv-based multiplexed
IO-and-events.
- Libuv-the-C-code is in the build already. We submodule it in from
joyent from time to time. I updated it most recently on Friday.
- We intend it to be a core dependency, actually just statically
linked into our runtime library. Already is.
- Libuv bindings exist in two forms in libstd currently, both
incomplete: uv and uvtmp. They should be merged, cleaned up,
made reliable and extended; uvtmp is the new one and should
probably be renamed uv, with the old one removed.
- Note that uv is currently in libstd. All of io is, and much of os.
This is unintentional. We didn't manage to move them to core by
the time we did 0.1. They should be in core as they are interfaces
to services provided by librustrt (criterion #2). I'm in the
process of moving os to libcore, hopefully this week.
- Mostly we just lack sustained focus on uv. People keep getting
into the work and then getting distracted with other things. This
is not meant as criticism of the people who have worked on it or
are presently working on it. It's just a fact: we have too much to
do right now so everyone gets time-sliced a fair bit.
- Currently brson is working closest to uv. In particular there's a
small quantity of reorganizing the runtime scheduler and thread
abstractions that has to be done before uv can be used safely and
sanely from the rust libraries we have in mind. He's working on
that presently, then may or may not return to hacking directly on
the uv bindings. Others poke in from time to time from the
servo team.
- Read the changelogs on src/libstd/uv.rs and uvtmp.rs, as well as
the C++ file src/rt/rust_uv.cpp to see who's been working on what.
I'm certain you'd be welcome to lend a hand completing and extending
the uv interface.
Thanks for your interest,
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev