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.
(Of course, things like WebGL that depend on a specific browser API won't work without that API.) On Sat, Jul 22, 2017 at 9:19 AM, Greg S <[email protected]> wrote: > I want to use emscripten to sandbox compiled C code in a program that > isn't a web browser. Is this a crazy idea? I do already have a V8 embedded > interpreter but how much of the emscripten codebase assumes the entire > browser environment and not just the raw interpreter? > > I haven't found any examples of anyone else doing this but it seems an > obvious idea. There are plenty of other situations where people want to run > untrusted C code in a sandbox. Can anyone point me to existing examples > using emscripten? > > Thanks > > -- > 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.
