https://github.com/geekbrother/napi-rs-echo-rust-client
Example of using the Rust gRPC Tonic streaming client in the Node app using the NAPI-RS bridge
https://github.com/geekbrother/napi-rs-echo-rust-client
napi napi-rs nodejs rust
Last synced: 2 months ago
JSON representation
Example of using the Rust gRPC Tonic streaming client in the Node app using the NAPI-RS bridge
- Host: GitHub
- URL: https://github.com/geekbrother/napi-rs-echo-rust-client
- Owner: geekbrother
- Created: 2023-01-30T11:03:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T14:51:00.000Z (about 2 years ago)
- Last Synced: 2025-02-13T15:40:58.887Z (4 months ago)
- Topics: napi, napi-rs, nodejs, rust
- Language: JavaScript
- Homepage:
- Size: 5.62 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# napi-rs-echo-rust-client
Example of using the Rust [Tonic](https://github.com/hyperium/tonic) gRPC bidirectional streaming client in the Node app using the NAPI-RS.This example uses [echo proto file from the Tonic examples](https://github.com/hyperium/tonic/tree/master/examples/proto/echo). You can use the [Tonic echo server](https://github.com/hyperium/tonic/blob/master/examples/src/streaming/server.rs) for this client as an example.
- Rust library is in `src/lib.rs`
- NodeJS calling in `test.mjs`## How to Run
- `yarn`
- `yarn build`
- Start the [echo server](https://github.com/hyperium/tonic/blob/master/examples/src/streaming/server.rs)
- Run `node test.mjs`