Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zduny/zzrpc
RPC over mezzenger transports.
https://github.com/zduny/zzrpc
communication rpc rpc-library
Last synced: 3 months ago
JSON representation
RPC over mezzenger transports.
- Host: GitHub
- URL: https://github.com/zduny/zzrpc
- Owner: zduny
- License: apache-2.0
- Created: 2022-12-19T09:16:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T16:09:07.000Z (over 1 year ago)
- Last Synced: 2024-10-15T17:23:16.266Z (4 months ago)
- Topics: communication, rpc, rpc-library
- Language: Rust
- Homepage: https://docs.rs/zzrpc/
- Size: 67.4 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# zzrpc
[![Test Status](https://github.com/zduny/zzrpc/actions/workflows/rust.yml/badge.svg)](https://github.com/zduny/zzrpc/actions)
[![Crate](https://img.shields.io/crates/v/zzrpc.svg)](https://crates.io/crates/zzrpc)
[![API](https://docs.rs/zzrpc/badge.svg)](https://docs.rs/zzrpc)[RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) over [mezzenger](https://github.com/zduny/mezzenger) transports.
https://crates.io/crates/zzrpc
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/O5O31JYZ4)
## usage
See [zzrpc-tutorial](https://github.com/zduny/zzrpc-tutorial).
## targeting WebAssembly
See [rust-webapp-template-api](https://github.com/zduny/rust-webapp-template-api).
## further work
Following improvements are planned for development:
1. Support for two more method types:
- method with default return without acknowledgment - its future will return as soon as request message is sent to producer without waiting for `()` response from the producer:
```rust
#[no-ack]
async fn do_something_i_dont_care_if_it_completes(&self, some_argument: i32);
```
- method with [`CancellationToken`](https://docs.rs/tokio-util/latest/tokio_util/sync/struct.CancellationToken.html) argument - so producer implementors can receive request abort messages (currently "aborting" a request means only that the producer will ignore task's result and not send it to the consumer - it doesn't mean the task itself is meaningfully affected):
```rust
use tokio_util::sync::CancellationToken;
// ...
async fn do_some_task(
&self,
cancellation_token: CancellationToken,
some_argument: i32) -> u64;
```
Of course consumer method would not have `cancellation_token` argument:
```rust
fn do_some_task(&self, some_argument: i32) -> zzrpc::ValueRequest;
```
2. An option to generate bindings so consumer methods could be called directly from JavaScript using [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen).
## see also
[mezzenger](https://github.com/zduny/mezzenger)
[remote procedure call](https://en.wikipedia.org/wiki/Remote_procedure_call)