docs.rs failed to build cu-rng-1.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
cu-rng-1.1.0
Seeded pseudo-random number generator resource for Copper.
[CuRng] is a deterministic, reproducible RNG (ChaCha8) usable anywhere
[rand::Rng] is expected. It is wired into a Copper app as a
single-slot resource bundle, [CuRngBundle], via the standard resource
mechanism.
Use [prelude] to bring the normal rand sampling API into scope:
use *;
let mut rng = from_seed;
let unit_f64: f64 = rng.random;
let unit_f32: f32 = rng.random;
let noise: f64 = rng.random_range;
let enabled: bool = rng.random;
let dropout: bool = rng.random_bool;
let vector: = rng.random;
assert!;
assert!;
assert!;
let _ = ;
Example config
(
resources: [
( id: "planner_rng", provider: "cu_rng::CuRngBundle", config: {"seed": 12345} ),
],
tasks: [
( id: "planner", type: "tasks::MyPlanner",
resources: { "rng": "planner_rng.rng" } ),
],
)
On the task side, declare the binding with the resources! macro:
use *;
use resources;
use *;