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-discuss+unsubscr...@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/CAL_va29SO-2SQy%2B62eEyeH1VMkimk%3D5Du%3Dp%3DC2TA5LFM5EDi%2Bw%40mail.gmail.com.

Reply via email to