3 releases
| 0.1.2 | Jul 26, 2025 |
|---|---|
| 0.1.1 | May 4, 2025 |
| 0.1.0 | May 4, 2025 |
#48 in #web-worker
279 downloads per month
Used in dportable
9KB
167 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
~135–530KB
~13K SLoC