3 releases
new 0.1.2 | Jan 28, 2025 |
---|---|
0.1.1 | Jan 24, 2025 |
0.1.0 | Jan 23, 2025 |
#647 in Network programming
350 downloads per month
Used in 3 crates
125KB
3K
SLoC
watermelon
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.
Advantages over async-nats
- 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.
Disadvantages over async-nats
- 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.
License
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.
Contribution
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.
Dependencies
~2.6–4MB
~74K SLoC