Crates.io | tokio-unix-ipc |
lib.rs | tokio-unix-ipc |
version | 0.3.0 |
source | src |
created_at | 2021-08-01 13:32:48.925601 |
updated_at | 2022-09-17 20:38:51.426867 |
description | A minimal abstraction for IPC via unix sockets. |
homepage | https://github.com/mitsuhiko/tokio-unix-ipc |
repository | https://github.com/mitsuhiko/tokio-unix-ipc |
max_upload_size | |
id | 430009 |
size | 75,377 |
This crate implements a minimal abstraction over UNIX domain sockets for the purpose of IPC on top of tokio. It lets you send both file handles and rust objects between processes. This is a replacement for my earlier unix-ipc crate.
This uses serde to serialize data over unix sockets
via bincode. Thanks to the
Handle
abstraction you can also send any object
across that is convertable into a unix file handle.
The way this works under the hood is that during serialization and deserialization encountered file descriptors are tracked. They are then sent over the unix socket separately. This lets unassociated processes share file handles.
If you only want the unix socket abstraction you can disable all default features and use the raw channels.
All features are enabled by default but a lot can be turned off to cut down on dependencies. With all default features enabled only the raw types are available.
serde
: enables serialization and deserialization.bootstrap
: adds the Bootstrapper
type.