emit_rand 0.10.0

rand-based Rng for emit.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 4 items with examples
  • Size
  • Source code size: 21.52 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.55 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • emit-rs/emit_rand
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • KodrAus

emit_rand

rand

Current docs

An implementation of emit::Rng using a specific version of the rand library.

emit itself has a rand feature and provides exactly the same RandRng, but only on select platforms. You can use emit_rand to always configure emit using rand if you're also using it elsewhere in your application, and want to guarantee only a specific version will end up in your dependency tree.

Getting started

Add emit and emit_rand to your Cargo.toml:

[dependencies.emit]
version = "1"
# Disable default features of `emit` to avoid pulling in a possibly different version of `rand`
default-features = false
features = ["std", "implicit_rt"]

[dependencies.emit_rand]
version = "0.9"

Configure emit to use the RandRng type from this library during setup:

fn main() {
    let rt = emit::setup()
        .with_rng(emit_rand::rng())
        // Other configuration goes here
        .init();

    // Your app code goes here

    rt.blocking_flush(std::time::Duration::from_secs(5));
}

Versioning and compatibility

emit_rand version x.y.z is compatible with rand version x.y.*.