Damian Reeves
Creating custom ops for deno_core that take in arrays and strucks
I am interested in creating custom ops for deno_core.
I have one case where I want to take in a
Vec<String>
and return a Result that possibly includes my own custom enum type or struct as a result.
Secondly I want to be able to pass my own custom struct to my op.
What do I need to do to achieve this?3 replies
Using Deno core in an app that already had its own tokio runtime
I am using the deno_core and deno_ast crates to "Roll my own JavaScript runtime", as seen here (https://github.com/denoland/roll-your-own-javascript-runtime/blob/main/src/main.rs#L153-L159 ), but I don't know how to launch my deno runtime properly within my existing tokio runtime.
I've tried using a
Handle
and spawning a thread and using block_on, like below:
But the moment I execute the example script, it fails at setTimeout
.
I end up with output like below:
12 replies