Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random seems broken in Javy #318

Closed
jianghong opened this issue Apr 25, 2023 · 0 comments · Fixed by #377
Closed

Random seems broken in Javy #318

jianghong opened this issue Apr 25, 2023 · 0 comments · Fixed by #377
Labels
bug Something isn't working

Comments

@jianghong
Copy link
Contributor

Given a JS source file that looks like:

console.log(Math.random())

I see the following output:

➜  javy git:(main) target/release/javy compile index.js -o index.wasm                                                                   
➜  javy git:(main) wasmtime run index.wasm
0.6111985957948094
➜  javy git:(main) wasmtime run index.wasm
0.6111985957948094

Running the same module with a random call multiple times results in the same output. Random should not be deterministic when not using a deterministic-wasi-ctx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant