dportable-macros

Crates.iodportable-macros
lib.rsdportable-macros
version0.1.2
created_at2025-05-04 11:17:42.819777+00
updated_at2025-07-26 01:57:29.607185+00
descriptionPortable interface for various utilities (macros).
homepage
repositoryhttps://github.com/zduny/dportable
max_upload_size
id1659541
size9,538
Daniel Zduniak (zduny)

documentation

https://docs.rs/dportable/

README

dportable

Test Status Crate API

https://crates.io/crates/dportable

ko-fi

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 and RwLock (using parking_lot on native platforms and std::cell::RefCell in WASM).
  • asynchronous spawn (not requiring Send in WASM) and sleep,
  • Timeout future,
  • dtest attribute macro to create tests for both native and WASM targets, also dtest_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.
Commit count: 28

cargo fmt