Registry / async / wasm-sync

wasm-sync

JSON →
library0.1.2rscratesunverified

Provides synchronization primitives that work both in web (WASM) and native environments.

# Cargo.toml [dependencies] wasm_sync = "0.1.2"
INSTALL
IMPORT
SIG · WASM-SYNC
W
wasm-sync
asyncrustv0.1.2
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.

Mutex
use wasm_sync::Mutex;

Locks a mutex and modifies the protected value.

use wasm_sync::Mutex; fn main() { let mutex = Mutex::new(42); let mut guard = mutex.lock().unwrap(); *guard += 1; println!("Value: {}", *guard); }
Debug
Known issues
gotchaOn WASM targets, this crate uses a different implementation that may have different performance characteristics.
fix
Test your code on both native and WASM targets to ensure correctness.
affects: >=0.1.0
Upgrade
Version history
0.1.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
36
Resources
wasm-sync — cargo add wasm-sync · libregistry