diff --git a/Cargo.toml b/Cargo.toml index e6298b4..764add1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Gonçalo Rica Pais da Silva "] edition = "2021" repository = "https://github.com/Bluefinger/bevy_rand" license = "MIT OR Apache-2.0" -version = "0.5.2" +version = "0.6.0" rust-version = "1.76.0" [workspace.dependencies] @@ -16,7 +16,7 @@ serde = "1" serde_derive = "1" rand_core = { version = "0.6", features = ["std"] } rand_chacha = "0.3" -wyrand = "0.1" +wyrand = "0.2" rand_pcg = "0.3" rand_xoshiro = "0.6" @@ -45,7 +45,7 @@ wyrand = ["bevy_prng/wyrand"] [dependencies] # bevy bevy.workspace = true -bevy_prng = { path = "bevy_prng", version = "0.5" } +bevy_prng = { path = "bevy_prng", version = "0.6" } # others rand_core.workspace = true @@ -58,10 +58,10 @@ serde_derive = { workspace = true, optional = true } # cannot be out of step with bevy_rand due to dependencies on traits # and implementations between the two crates. [target.'cfg(any())'.dependencies] -bevy_prng = { path = "bevy_prng", version = "=0.5" } +bevy_prng = { path = "bevy_prng", version = "=0.6" } [dev-dependencies] -bevy_prng = { path = "bevy_prng", version = "0.5", features = ["rand_chacha", "wyrand"] } +bevy_prng = { path = "bevy_prng", version = "0.6", features = ["rand_chacha", "wyrand"] } rand = "0.8" ron = { version = "0.8.0", features = ["integer128"] } diff --git a/MIGRATIONS.md b/MIGRATIONS.md index bf19ff3..9b2973a 100644 --- a/MIGRATIONS.md +++ b/MIGRATIONS.md @@ -19,3 +19,7 @@ use bevy_rand::prelude::*; ``` This **will** change the type path and the serialization format for the PRNGs, but currently, moving between different bevy versions has this problem as well as there's currently no means to migrate serialized formats from one version to another yet. The rationale for this change is to enable stable `TypePath` that is being imposed by bevy's reflection system, so that future compiler changes won't break things unexpectedly as `std::any::type_name` has no stability guarantees. Going forward, this should resolve any stability problems `bevy_rand` might have and be able to hook into any migration tool `bevy` might offer for when scene formats change/update. + +## Migrating from v0.5 to v0.6 + +As the `wyrand` dependency has been updated and contains a breaking output change, users of `bevy_rand` making use of the `wyrand` feature will need to update their code in cases where deterministic output from the old version is expected. The new `WyRand` output is considered to provide better entropy than the old version, so it is recommended to adopt the new version. In reality, this is likely to affect tests and serialised output rather than game code. diff --git a/README.md b/README.md index 7222020..ed529e3 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ fn setup_npc_from_source( | `bevy` | `bevy_rand` | | ------ | ----------- | -| v0.13 | v0.5 | +| v0.13 | v0.5, v0.6 | | v0.12 | v0.4 | | v0.11 | v0.2, v0.3 | | v0.10 | v0.1 | @@ -137,7 +137,7 @@ The versions of `rand_core`/`rand` that `bevy_rand` is compatible with is as fol | `bevy_rand` | `rand_core` | `rand` | | ------------ | ----------- | ------ | -| v0.1 -> v0.5 | v0.6 | v0.8 | +| v0.1 -> v0.6 | v0.6 | v0.8 | ## Migrations diff --git a/tests/determinism.rs b/tests/determinism.rs index 9989d5a..a33146c 100644 --- a/tests/determinism.rs +++ b/tests/determinism.rs @@ -74,7 +74,7 @@ fn random_output_e(mut q_source: Query<&mut EntropyComponent, With