2 releases
new 0.1.1 | May 4, 2025 |
---|---|
0.1.0 | May 4, 2025 |
#868 in Procedural macros
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:
Mutex
andRwLock
(using parking_lot on native platforms andstd::cell::RefCell
in WASM).- asynchronous
spawn
(not requiringSend
in WASM) andsleep
, Timeout
future,dtest
attribute macro to create tests for both native and WASM targets, alsodtest_configure
macro to configure tests to run in browser.create_non_sync_send_variant_for_wasm
utility macro for creating non-Send
and non-Sync
variants of traits for use in WASM.random
function.
Dependencies
~210–650KB
~15K SLoC