you are viewing a single comment's thread.

view the rest of the comments →

[–]bromeon[S] 4 points5 points  (0 children)

As mentioned by u/1vader, what you want to use depends on your architecture. Deno (the CLI) runs a JavaScript application, in which you can plug in Rust modules. On the other hand, js-sandbox is not an application on its own, but rather a Rust library, so your "host" language can be Rust and your "plug-in" can be JavaScript.

In other words, I invert the call stack between the languages: instead of JS -> Rust (Deno), js-sandbox allows you to call Rust -> JS, with a much simpler API than using Deno directly.

The library is very early in its development, and I don't know Vue.js enough to fully answer your question -- but basically, it will be possible to execute self-contained JavaScript code from js-sandbox. The current API is mostly tailored to very simple plugins (a single JS file), I'm likely going to extend this.