Commit 9ea0e75
authored
Remove Preview1's advice about random-number generators. (#664)
Previously, the preview1 documentation for the `random_get` function said:
> This function may execute slowly, so when large mounts of random data are
> required, it's advisable to use this function to seed a pseudo-random
> number generator, rather than to provide the random data directly.
However, Wasm guest code is unaware of VM forks in any VMs might be running
in, as well as snapshot/resume features offered by some Wasm engines and
tools, so in practice, WASI use cases have tended toward using `random_get`
in place of guest PRNGs, and thus to relying on `random_get` executing
quickly.
This pattern seems sufficiently widely applicable to motivate updating
WASIp1 to reflect it. To be sure, this is not a behavior change; it's just
removing what we now understand to be bad advice in general.
WASIp2 for its part has already made a similar change.1 parent 8ee4188 commit 9ea0e75
File tree
5 files changed
+1
-13
lines changed- legacy
- preview0
- witx
- preview1
- witx
5 files changed
+1
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2394 | 2394 | | |
2395 | 2395 | | |
2396 | 2396 | | |
2397 | | - | |
2398 | | - | |
2399 | | - | |
2400 | 2397 | | |
2401 | 2398 | | |
2402 | 2399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | 469 | | |
473 | 470 | | |
474 | 471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1211 | 1211 | | |
1212 | 1212 | | |
1213 | 1213 | | |
1214 | | - | |
| 1214 | + | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | 1217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2422 | 2422 | | |
2423 | 2423 | | |
2424 | 2424 | | |
2425 | | - | |
2426 | | - | |
2427 | | - | |
2428 | 2425 | | |
2429 | 2426 | | |
2430 | 2427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
| |||
0 commit comments