Registry / messaging / nats
library0.26.0rscratesunverified

A Rust NATS client (deprecated — use async-nats instead).

# Cargo.toml [dependencies] nats = "0.26.0"
INSTALL
IMPORT
SIG · NATS
N
nats
messagingrustv0.26.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Connection
use nats::Connection;

Connects to a NATS server and publishes a message.

use nats::Connection; let nc = Connection::new("nats://localhost:4222").unwrap(); nc.publish("subject", b"data").unwrap();
Debug
Known issues
breakingThis crate is deprecated; use `async-nats` instead.
fix
Replace `nats` with `async-nats` in your Cargo.toml and update imports.
affects: >=0.26.0
Upgrade
Version history
0.26.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Amazon
1
OpenAI (training)
1
Resources
nats — cargo add nats · libregistry