Sounds feasible. Basically just get v8 to expose whatever APIs you need to
JS (like it does all the existing APIs) and then just call those from
emscripten JS code.

On Sat, Jul 22, 2017 at 9:45 AM, Greg Stark <[email protected]> wrote:

> On 22 July 2017 at 17:37, Alon Zakai <[email protected]> wrote:
> > Emscripten output is designed to run in either a browser or a shell
> > environment. Supported shells are node.js, d8 (the v8 shell) and the
> > SpiderMonkey shell. The only differences between the various environments
> > are handled in src/shell.js, which is mostly input/output stuff (how to
> > print to stdout, how to read from a file, etc.). If you just do pure
> > computation, there's a good chance things will just work for you.
> Otherwise,
> > you might need to modify shell.js a little bit.
>
> Ah, the pointer to shell.js is probably what I needed. You've given me
> some hope.
>
> My first experiments will be to just do pure computation but
> eventually I do expect to need to provide API wrappers to expose all
> the bits of the host API I want the sandboxed environment to have
> access to. Of course the trick will be how to do so without opening up
> holes in the sandbox. In most cases these API wrappers will actually
> be doing something kind of upside down of wrapping the existing v8
> javascript wrappers which are themselves just wrapping the host
> environment's C API functions.
>
> --
> greg
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to