Build
Status

API Documentation

Usage

Add the following to your Cargo.toml

toml [dependencies] amy = "0.5"

Add this to your crate root

rust extern crate amy;

Introduction

Amy is a Rust library supporting asynchronous I/O by abstracting over the kernel pollers kqueue and epoll. Amy has the following goals behind it's design:

The best way to get started writing your code with Amy is to take a look at the [Getting Started Guide] (https://github.com/andrewjstone/amy/blob/master/doc/getting_started.md).

How is this different from Mio

Mio is a fantastic project from which Amy has cribbed many ideas. However, the two are distinct in a few specific areas. The core difference is that mio is inherently single threaded: registrations must be made on the same thread as the poller, and the poll loop must be woken up in order to add registrations. In contrast Amy allows registrations to be made on a separate thread from the poller without waking it. Amy also provides a smaller code base dedicated to async network programming. It does not allow arbitrary registration of events with the kernel poller, although this could be easily provided. Like Mio, Amy is a building block and the choice of whether to use one or the other is simply one of preference.

The choice to use Mio or Amy is not necessarily clear, so a short list of features is drawn below, along with some (subjective) use cases showing the reasons to choose either Mio or Amy.

Choose Mio if you: * Need Windows support * Are writing a single threaded server * Want to use the canonical Rust library for Async I/O

Choose Amy if you: * Only need \*nix support * Are writing a multi-threaded server requiring cross thread registration * Want a small, easily auditable library, with little unsafe code * Are comfortable using something newer and less proven

Limitations