3 releases
| 0.1.2 | Jul 26, 2025 |
|---|---|
| 0.1.1 | May 4, 2025 |
| 0.1.0 | May 4, 2025 |
#548 in Concurrency
269 downloads per month
22KB
546 lines
dportable
https://crates.io/crates/dportable
Portable interface for various utilities.
Intended targets are:
- native platforms with tokio async runtime,
- WebAssembly targeted to browsers, including WebWorkers, under standard single-threaded model.
Following features are provided:
MutexandRwLock(using parking_lot on native platforms andstd::cell::RefCellin WASM).- asynchronous
spawn(not requiringSendin WASM) andsleep, Timeoutfuture,dtestattribute macro to create tests for both native and WASM targets, alsodtest_configuremacro to configure tests to run in browser.create_non_sync_send_variant_for_wasmutility macro for creating non-Sendand non-Syncvariants of traits for use in WASM.randomfunction.
Dependencies
~0.8–12MB
~117K SLoC