6 releases

0.1.3 Feb 1, 2021
0.1.2 Feb 1, 2021
0.1.2-alpha.1 Jul 29, 2020
0.0.0 Jul 5, 2020

#60 in Asynchronous

Download history 904/week @ 2020-11-09 976/week @ 2020-11-16 660/week @ 2020-11-23 740/week @ 2020-11-30 904/week @ 2020-12-07 715/week @ 2020-12-14 546/week @ 2020-12-21 245/week @ 2020-12-28 1168/week @ 2021-01-04 1759/week @ 2021-01-11 817/week @ 2021-01-18 1164/week @ 2021-01-25 1164/week @ 2021-02-01 833/week @ 2021-02-08 1209/week @ 2021-02-15 3031/week @ 2021-02-22

3,867 downloads per month
Used in 10 crates (2 directly)

Apache-2.0/MIT

155KB
3.5K SLoC

Nuclei: Proactive IO & Runtime system

Nuclei is a proactive IO system which is runtime agnostic and can work with any runtime. The proactive system's design principles are matching Boost Asio. Nuclei is not using a conventional reactor approach. It is completely asynchronous, and it's wrapping poll based IO in a proactive fashion.

Nuclei uses epoll on Linux as the primary evented IO backend, secondarily (given system support) you can use io_uring. On MacOS, Nuclei is using kqueue. On Windows, the IOCP backend will be used.

The current io_uring implementation needs a modern Linux kernel (5.6+).

Features

  • Async TCP, UDP, Unix domain sockets and files...
  • The proactor system doesn't block
  • Scatter/Gather operations
  • Minimal allocation
  • More expressive than any other runtime
  • Completely asynchronous I/O system with lock free programming

Examples

Please head to examples directory to run the examples:

$ cd examples
$ cargo run --example fread-vect

Tests

$ cargo test --no-default-features --features=iouring # For iouring
$ cargo test # For others

Configurations

Evented IO backend

When the iouring feature gate is not enabled, the platforms evented backend is used. For example, on Linux, epoll would be used.

Executor

Executor is by default set to Bastion's executor. If you want to use different executor, you can use one of the available runtimes with one of these features: bastion, asyncstd, tokio, smol.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Credits

Gif is from the documentary called "Particle Fever".

Dependencies

~2.8–4MB
~79K SLoC