Registry / async / tor-rtcompat

tor-rtcompat

JSON →
library0.40.0rscratesunverified

Compatibility layer for asynchronous runtimes, used by Tor.

# Cargo.toml [dependencies] tor-rtcompat = "0.40.0"
INSTALL
IMPORT
SIG · TOR-RTCOMPAT
T
tor-rtcompat
asyncrustv0.40.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.

PreferredRuntime
use tor_rtcompat::PreferredRuntime;

Creates and uses the preferred async runtime for Tor applications.

use tor_rtcompat::PreferredRuntime; fn main() { let runtime = PreferredRuntime::create().unwrap(); runtime.block_on(async { println!("Running on Tor's async runtime"); }); }
Debug
Known issues
gotchaRequires a Tokio or async-std runtime feature to be enabled.
fix
Add `features = ["tokio"]` or `features = ["async-std"]` to your Cargo.toml dependency.
affects: >=0.1.0
Upgrade
Version history
0.40.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
28
OpenAI (training)
1
Resources
tor-rtcompat — cargo add tor-rtcompat · libregistry