Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove librustuv and dependencies #17673

Merged
merged 5 commits into from
Oct 1, 2014
Merged

Remove librustuv and dependencies #17673

merged 5 commits into from
Oct 1, 2014

Conversation

aturon
Copy link
Member

@aturon aturon commented Oct 1, 2014

This PR begins the process of runtime removal by dismantling the librustuv crate and associated event loop.

The result is that, while libgreen can still be used for task scheduling purposes, it will no longer be feasible to use green-threaded I/O.

Removing the libuv-based event loop eases the transition away from the runtime system, which will be done incrementally.

In terms of visible API changes, this PR:

  • Removes std::io::signal, which was never implemented on the native threading model.
  • Removes the iotest! macro, which was previously used to run I/O tests on both green and native threading models.
  • Removes the green_start! macro for starting an application with a librustuv event loop.
  • Removes the librustuv crate itself.

It also removes the libuv and gyp submodules and adjusts the build system and copyright notices accordingly.

If you wish to continue using librustuv and green-threaded I/O, consider using green-rs, which provides its own I/O stack.

@aturon
Copy link
Member Author

aturon commented Oct 1, 2014

cc @alexcrichton, this is ready for an initial review but needs a bit more work to pass tests.

This PR replaces an older one that initially aimed to do this work. (@anchovieshat, I've been trying to reach you about this, but was unsuccessful.) This PR more thoroughly and conservatively addresses tests, as well as a few other details.

@aturon
Copy link
Member Author

aturon commented Oct 1, 2014

(Also note that the changes are broken into several commits to ease reviewing.)

@alexcrichton
Copy link
Member

We don't currently have a migration path for users of librustuv, although I have worked on this out of tree. At this point, I think I should tidy that up so it works with the in-tree libgreen today, and move it to rust-lang. Does that sound ok? That way you can put in the commit message the migration path forward.

@aturon
Copy link
Member Author

aturon commented Oct 1, 2014

@alexcrichton My worry about that is that, in my main branch for the I/O work, I'm dismantling the rtio infrastructure and coupling std::io directly to the new platform_imp infrastructure instead. I'm hoping to start landing some of those changes in the near future. So I'm not sure how viable an rtio-based migration path is, even in the short term.

In the long term, the only way to keep green-threaded I/O alive is to essentially fork std::io and do work similarly to what I'm doing now, but coupling to librustuv instead. That seems like a large investment, and certainly something I have a hard time seeing happening in the next months. What are your thoughts on the long-term picture?

@aturon aturon force-pushed the remove-uv branch 2 times, most recently from 99ff21a to a4e3461 Compare October 1, 2014 16:24
@aturon aturon changed the title WIP: Remove librustuv and dependencies Remove librustuv and dependencies Oct 1, 2014
This commit removes the `iotest!` macro from `std::io`. The macro was
primarily used to ensure that all io-related tests were run on both
libnative and libgreen/librustuv. However, now that the librustuv stack
is being removed, the macro is no longer needed.

See the [runtime removal
RFC](rust-lang/rfcs#230) for more context.

[breaking-change]
This commit removes the `librustuv` crate.

See the [runtime removal
RFC](rust-lang/rfcs#230) for more context.

See [green-rs](https://github.com/alexcrichton/green-rs/) for a possible
migration path if you wish to continue using green-threaded I/O. The
library provides its own I/O API surface.

[breaking-change]
This commit removes the libuv and gyp submodules, as well as all build
infrastructure related to them.

For more context, see the [runtime removal
RFC](rust-lang/rfcs#230)

[breaking-change]
The `std::io::signal` API was only implemented under `librustuv`, which
is now being removed. Rather than keep around an unimplemented API, this
commit removes it altogether.

See the [runtime removal
RFC](rust-lang/rfcs#230) for more context.

See [green-rs](https://github.com/alexcrichton/green-rs/) for a possible
migration path for signal handling code, although in the long run we
plan to add native signal handling to `std::io`.

[breaking-change]
@aturon
Copy link
Member Author

aturon commented Oct 1, 2014

@alexcrichton Reminder, when this lands we need to investigate why gyp and libuv were still showing up on the mac bot, and remove the mentions in mk/tests.mk. For now I'm sending to bors with a reverted make tidy.

bors added a commit that referenced this pull request Oct 1, 2014
This PR begins the process of [runtime removal](rust-lang/rfcs#230) by dismantling the `librustuv` crate and associated event loop.

The result is that, while `libgreen` can still be used for task scheduling purposes, it will no longer be feasible to use green-threaded I/O.

Removing the libuv-based event loop eases the transition away from the runtime system, which will be done incrementally.

In terms of visible API changes, this PR:

* Removes `std::io::signal`, which was never implemented on the native threading model.

* Removes the `iotest!` macro, which was previously used to run I/O tests on both green and native threading models.

* Removes the `green_start!` macro for starting an application with a `librustuv` event loop.

* Removes the `librustuv` crate itself.

It also removes the `libuv` and `gyp` submodules and adjusts the build system and copyright notices accordingly.

If you wish to continue using `librustuv` and green-threaded I/O, consider using [green-rs](https://github.com/alexcrichton/green-rs/), which provides its own I/O stack.
@bors bors closed this Oct 1, 2014
@bors bors merged commit dad59bd into rust-lang:master Oct 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants