How to pass JavaScript functions from V8 to Rust? #19231
-
Hello everyone I am following this tutorial about how to write a custom JavaScript runtime using Deno and Rust Can anyone help? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Example: Lines 53 to 66 in 26f42a2 That said - this is limited to only synchronous ops. You won't be able to pass and call a JS function in an asynchronous op. If you want to see how to implement |
Beta Was this translation helpful? Give feedback.
-
For future readers like me: deno/ext/node/ops/inspector.rs Lines 103 to 161 in d91658b Asynchronous ops are also possible by using |
Beta Was this translation helpful? Give feedback.
Example:
deno/core/ops_builtin_v8.rs
Lines 53 to 66 in 26f42a2
That said - this is limited to only synchronous ops. You won't be able to pass and call a JS function in an asynchronou…