#nftables #async-version #async #helper #run #ruleset #async-process

nftables-async

An async version of the helper to run nftables, providing full compatibility with the rest of the nftables crate

3 unstable releases

0.2.2 Dec 1, 2024
0.2.1 Nov 29, 2024
0.2.0 Nov 29, 2024
0.1.1 Oct 27, 2024
0.1.0 Oct 27, 2024

#2102 in Network programming

Download history 146/week @ 2024-10-21 91/week @ 2024-10-28 13/week @ 2024-11-04 13/week @ 2024-11-11 14/week @ 2024-11-18 302/week @ 2024-11-25 107/week @ 2024-12-02 57/week @ 2024-12-09

481 downloads per month
Used in 4 crates (via fcnet)

MIT license

12KB
185 lines

nftables-async

An async version of the helper to run nftables in the nftables crate. Simply add both nftables-async and nftables to your crate, then use the nftables_async::apply_ruleset or nftables_async::get_current_ruleset to perform manipulations. Everything is compatible with the sync helper, even the error types, the functions, however, return "true" async futures.

To provide the asynchronous I/O, an implementation of the Process trait in the crate is needed. Two implementations are provided built-in behind feature gates:

  1. TokioProcess using the Tokio stack, enabled via tokio-process feature
  2. AsyncProcess using the async-process crate (Smol stack), enabled via async-process feature

Dependencies

~1–12MB
~159K SLoC