Pure Rust NATS client implementation and tokio integration
watermelon
is an independent implementation of the NATS protocol.
The goal of the project is to produce an opinionated, composable,
idiomatic implementation with a keen eye on security, correctness and
ease of use.
Watermelon is divided into multiple crates, all hosted in the same monorepo.
- Security: this client is protected against command injection attacks via checked APIs like
Subject
. - Extendibility: exposes the inner components via
watermelon-mini
andwatermelon-net
. - Error handling:
subscribe
errors are correctly caught - internally enables server verbose mode. - Fresh start: this client only supports nats-server >=2.10.0. We may drop support for older server versions as new ones come out.
tls://
also uses TLS-first handshake mode by default. - Licensing: dual licensed under MIT and APACHE-2.0.
- Completeness: most APIs (Jetstream specifically) haven't been implemented yet.
- Future work: we may never add support for functionallity that we, M4SS Srl, don't use.
- Difference in APIs: official NATS clients tend to have similar APIs.
watermelon
does not follow the official guidelines. - Ecosystem: as the client does not support older server versions or ignore old configuration options, it may not work in an environment that hasn't adopted the new standards yet.
- Backwards compatibility: this client is in no way compatible with the
async-nats
API and may make frequent breaking changes.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.