-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add support for getentropy in d8 #24185
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
Conversation
4a73c46
to
b7f2c75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, are you using d8 in production somewhere? i.e. what is the motivation for this change?
I asked @erikcorry if he could look into ways to improve codegen for Python ceval.c and he said it would be much easier if he could run Pyodide in d8 as opposed to having to build node or such against a branch of v8. |
But it was surprisingly not too hard to get it to work: https://github.com/pyodide/pyodide/pull/5607/files |
So you are patching / working on v8? Indeed that does sounds like a good use case. If you just want recent builds of v8 in node you can also use node canary which I think its basically a nightly build: https://nodejs.org/download/v8-canary/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you need to add os.system
to src/closure-externs/node-externs.js
maybe?
The same set of tests failed twice in CI but they pass for me locally. |
The closure compilr failure looks real:
|
Hmm:
|
Use
os.system
to read from/dev/urandom
and then base 64 encode the result. Then usebase64Decode
to read the result. Only works when--enable-os-system
is passed to d8.