Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nats-io/nats.rs
Rust client for NATS, the cloud native messaging system.
https://github.com/nats-io/nats.rs
cloud-native messaging messaging-library microservices nats rust
Last synced: 9 days ago
JSON representation
Rust client for NATS, the cloud native messaging system.
- Host: GitHub
- URL: https://github.com/nats-io/nats.rs
- Owner: nats-io
- License: apache-2.0
- Created: 2020-02-24T19:51:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T08:23:31.000Z (6 months ago)
- Last Synced: 2024-05-01T13:00:24.409Z (6 months ago)
- Topics: cloud-native, messaging, messaging-library, microservices, nats, rust
- Language: Rust
- Homepage:
- Size: 2.96 MB
- Stars: 948
- Watchers: 16
- Forks: 152
- Open Issues: 64
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE-OF-CONDUCT.md
Awesome Lists containing this project
- awesome-rust - nats-io/nats.rs - io/nats.rs/workflows/Rust/badge.svg?branch=master)](https://github.com/nats-io/nats.rs/actions) (Libraries / Network programming)
- awesome-rust-cn - nats-io/nats.rs
README
A Rust client for the NATS messaging system.## Motivation
Rust may be one of the most interesting new languages the NATS ecosystem has seen.
We believe this client will have a large impact on NATS, distributed systems, and
embedded and IoT environments. With Rust, we wanted to be as idiomatic as we
could be and lean into the strengths of the language. We moved many things that
would have been runtime checks and errors to the compiler, most notably options
on connections, and having subscriptions generate multiple styles of iterators
since iterators are first-class citizens in Rust. We also wanted to be aligned
with the NATS philosophy of simple, secure, and fast!## Clients
There are two clients available in two separate crates:
### async-nats
[![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Crates.io](https://img.shields.io/crates/v/async-nats.svg)](https://crates.io/crates/async-nats)
[![Documentation](https://docs.rs/async-nats/badge.svg)](https://docs.rs/async-nats/)
[![Build Status](https://github.com/nats-io/nats.rs/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/nats-io/nats.rs/actions)Async Tokio-based NATS client.
Supports:
* Core NATS
* JetStream API
* JetStream Management API
* Key Value Store
* Object Store
* Service APIThe API is stable, however it remains on 0.x.x versioning, as async ecosystem is still introducing a lot of ergonomic improvements. Some of our dependencies are also considered
stable, yet versioned <1.0.0, like `rustls`, which might introduce breaking changes that can affect our users in some way.#### Feature flags
Feature flags are Documented in `Cargo.toml` and can be viewed [here](https://docs.rs/crate/async-nats/latest/source/Cargo.toml.orig).
### nats
[![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Crates.io](https://img.shields.io/crates/v/nats.svg)](https://crates.io/crates/nats)
[![Documentation](https://docs.rs/nats/badge.svg)](https://docs.rs/nats/)
[![Build Status](https://github.com/nats-io/nats.rs/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/nats-io/nats.rs/actions)Legacy *synchronous* client that supports:
* Core NATS
* JetStream API
* JetStream Management API
* Key Value Store
* Object StoreThis client does not get updates, unless those are security fixes.
Please use the new `async-nats` crate.### Documentation
Please refer each crate docs for API reference and examples.
**Additionally Check out [NATS by example](https://natsbyexample.com) - An evolving collection of runnable, cross-client reference examples for NATS.**
## Feedback
We encourage all folks in the NATS and Rust ecosystems to help us
improve this library. Please open issues, submit PRs, etc. We're
available in the `rust` channel on [the NATS slack](https://slack.nats.io)
as well!