To add to that, as I mentioned on Discord, Emscripten output should just work in plain V8, or at least the d8 shell, using the "shell" environment. Maybe one or two minor d8 additions like a way to load a binary file would be needed in plain V8, but that's it.
- Alon On Wed, Feb 15, 2023 at 2:28 PM 'Sam Clegg' via emscripten-discuss < emscripten-discuss@googlegroups.com> wrote: > > > On Wed, Feb 15, 2023 at 2:16 PM Tudor Bosman <tud...@gmail.com> wrote: > >> Yes, I am interested in running this, we are embedding V8 to run plain JS >> already. I'm planning to test using d8 and then port the d8 API into our >> embedder. > > > If you are already embedding v8 then I don't see that there is anything > you should need to do. WebAssembly should just work in your embedded v8 > environment unless you are jumping through hoops to somehow disable it. > > > >> >> We're not using Node because of security isolation -- this is a piece of >> a larger puzzle that includes running untrusted code. >> >> Thanks, >> -Tudor. >> >> On Wednesday, February 15, 2023 at 1:19:25 PM UTC-8 s...@google.com >> wrote: >> >>> Are you interested in running the generated wasm and JS code, or just >>> the wasm code (in something like STANDALONE_WASM mode)? >>> >>> There are various options, but by far simplest is probably to use d8 >>> (the v8 command line tool normally used for testing). The easiest way to >>> install it is via jsvu: https://github.com/GoogleChromeLabs/jsvu. By >>> the way you should be able to run your code under the other shells >>> supported by jsvu too (e.g. jsc). >>> >>> If you want to take it to the next level you could embed v8 an your own >>> application using the v8 embedding API: >>> https://github.com/GoogleChromeLabs/jsvu >>> >>> It does beg the question though, why not just use node? >>> >>> cheers, >>> sam >>> >>> >>> On Wed, Feb 15, 2023 at 11:02 AM Tudor Bosman <tud...@gmail.com> wrote: >>> >>>> So perhaps I'm crazy, but I'd like to run C code (compiled to WASM via >>>> Emscripten) on bare embedded V8 (without a browser, and without Node). >>>> >>>> This would be for (headless) server-side code, so I don't care about >>>> graphics / audio / GL / etc, but ideally it would be complete enough to run >>>> Pyodide with numpy. >>>> >>>> Obviously I'd have to implement some glue API (perhaps emulating part >>>> of the browser API would be easier than Node's). Has anyone done anything >>>> similar? Is there a minimal set of interfaces documented anywhere? >>>> >>>> There is something called headless.js in the emscripten repository >>>> which seems to do something in this direction, but I'm not sure how far >>>> along it is and what else is needed, or even if I'm on the right path. >>>> >>>> Thanks, >>>> -Tudor. >>>> >>>> -- >>>> 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 emscripten-disc...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/emscripten-discuss/5b063948-670a-43f3-aed7-cc6ca96834b2n%40googlegroups.com >>>> <https://groups.google.com/d/msgid/emscripten-discuss/5b063948-670a-43f3-aed7-cc6ca96834b2n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> 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 emscripten-discuss+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/emscripten-discuss/20647156-2e3b-4446-867e-27823e2c372en%40googlegroups.com >> <https://groups.google.com/d/msgid/emscripten-discuss/20647156-2e3b-4446-867e-27823e2c372en%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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 emscripten-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-uZ4j6ZQhwr3-hdM_%2Bb1LwX%3DzuBb25TG4Zbgyr5zn%3DBw%40mail.gmail.com > <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-uZ4j6ZQhwr3-hdM_%2Bb1LwX%3DzuBb25TG4Zbgyr5zn%3DBw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpShMzDr-VTK6fh%2BPkV%2BFTVy5gFAi8bc9u8CGSxi-izUMw%40mail.gmail.com.