Registry / messaging / async-nats

async-nats

JSON →
library0.49.1rscratesunverified

A async Rust NATS client for interacting with NATS messaging systems.

# Cargo.toml [dependencies] async-nats = "0.49.1"
INSTALL
IMPORT
SIG · ASYNC-NATS
A
async-nats
messagingrustv0.49.1
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.

Client
use async_nats::Client;

Connect to a NATS server using async_nats.

use async_nats::Client; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let client = Client::new(); client.connect("nats://localhost:4222").await?; Ok(()) }
Debug
Known issues
gotchaRequires an async runtime like Tokio or async-std.
fix
Add tokio as a dependency and use #[tokio::main] or similar.
affects: >=0.49.0
Upgrade
Version history
0.49.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources
async-nats — cargo add async-nats · libregistry