Trying to pass parameters to runtime from rust

Hi, I'm launching a deno runtime from my project's code. I'm trying to pass some dynamic json variables to the runtime however I haven't been able to this. What's the best way to launch a runtime with a context?
3 Replies
NDH
NDH10mo ago
Importing JSON - Deno by Example
JSON files can be imported in JS and TS files using the import keyword. This makes including static data in a library much easier. -- Deno by example is a collection of annotated examples for how to use Deno, and the various features it provides.
andres-movinglake
Ok, so the best way to communicate with a script to be launched is to create a Json file and then have the JavaScript script load it from FS? I could use memfiles to avoid the disk lookup but it does add some complexity to the system @ndh3193 hey uhm do you have any help here? I've been trying to use extensions to pass some state to the javascript runtime but it's super complicated in Rust
NDH
NDH10mo ago
I don't have any experience with that. Sorry!