Xaeroxe / interprocess-typed

Typed version of the interprocess crate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

interprocess-typed

ci status

A wrapper over the interprocess crate which allows serde compatible types to be sent over a tokio local socket with async.

Who needs this?

Anyone who wishes to communicate between two processes running on the same system. This crate supports all the same systems as interprocess, which at time of writing includes

  • Windows
  • MacOS
  • Linux
  • Other Unix platforms such as BSDs, illumos, and Solaris

Unlike similar offerings in the Rust ecosystem, this crate supports having multiple clients connected to one server, and so is appropriate for use in daemons.

Why shouldn't I just use interprocess directly?

It depends on what you want to send! interprocess transmits raw streams of bytes, with no message delimiters or format. interprocess-typed allows you to send Rust types instead. Specifically, types that are serde-compatible. If your data is more easily described as a stream of bytes then you should use the interprocess crate directly. However, if you'd rather work with complex types, this crate suits your needs better.

Alternative async runtimes

interprocess-typed only supports tokio and has no plans to support alternate async runtimes.

Contributing

Contributions are welcome! Please ensure your changes to the code pass unit tests. If you're fixing a bug please add a unit test so that someone doesn't un-fix the bug later. This crate is kept intentionally minimalist, so most feature requests would fit better in a crate that uses this one as a dependency.

Binary Format

This crate uses async-io-typed to transform types into bytes. Information on the binary format can be found there.

About

Typed version of the interprocess crate

License:Apache License 2.0


Languages

Language:Rust 100.0%