Absolucy / Absolucy/nanorand-rs

cannot find function `backup_entropy` in this scope for wasm target even though source seed always provided

Ouverte
#33 8 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
251
Forks
24
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Apologies for asking a question by using an issue - I'm new to rust, and I wasn't sure how to deal with this myself.

I am wanting to reliably reproduce/shuffle vast quantities of data in wasm (yew-rs) by way of a seed provided by a server:
```rust
let mut rng = WyRand::new_seed(server_seed);
rng.shuffle(&renumber);
```
I don't think I need an additional source of entropy, since WyRand reproduces the same data for the same seed?

``` Compiling rand_core v0.6.3
error[E0425]: cannot find function `backup_entropy` in this scope
--> /home/krolaw/.cargo/registry/src/github.com-1ecc6299db9ec823/nanorand-0.6.1/src/entropy/mod.rs:51:2
|
51 | backup_entropy(out);
| ^^^^^^^^^^^^^^ not found in this scope
```
Cargo.toml entry:
```toml
nanorand = { version = "0.6.1", features = ["wyrand"] }
```
Thanks.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

The error occurs in src/entropy/mod.rs at line 51, where backup_entropy is called but not defined for WASM targets. Examine the entropy module to see which targets have the function, and check the WASM-specific code paths. Look for compile-time feature flags or conditional compilation attributes. The goal is to ensure WyRand works with a provided seed in WASM without requiring external entropy.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
rust, wasm
Domaine
backend, cli, tooling
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.