Hi,
Thank you very much for your reply, Sam.
I would also have another question about emscripten_run_script() function.
I just tried a very simple call in the main function:
emscripten_run_script("alert('hi')");
But I got this error in the browser after running the application.
"LinkError: WebAssembly.instantiate(): Import #28 module="env"
function="emscripten_run_script" error: function import requires a callable"
Am I missing something?
Thanks in advance for your help,
Balázs
'Sam Clegg' via emscripten-discuss <[email protected]>
ezt írta (időpont: 2022. dec. 6., K, 0:33):
> This is something you would most likely need to do from your own JS/HTML
> code. You can hook into the exit of a program using the `postRun` hook on
> the incoming module object to detect when the first module is done, and you
> can do whatever you want on your web page, including load new JS code, or
> navigate somewhere else.
>
> cheers,
> sam
>
> On Mon, Dec 5, 2022 at 3:30 AM Balázs Varga <[email protected]>
> wrote:
>
>> Hi All,
>>
>> Is it possible somehow to run a wasm app from another wasm app? For
>> example, running the emrun command from a main cpp function, somehow?
>>
>> int main(int argc, char* argv[])
>> {
>> emrun --serve_after_close foo.html;
>> }
>>
>> Thanks for your help, in advance.
>> Balázs
>>
>> --
>> 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].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/189c408e-9bc2-4bf4-8714-b0e0a65e9c6an%40googlegroups.com
>> <https://groups.google.com/d/msgid/emscripten-discuss/189c408e-9bc2-4bf4-8714-b0e0a65e9c6an%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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28k2vE6v%2Bi2dGiwOmA0SY7ce7%3DZ3cHdbB6UD9838o%2BiaQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28k2vE6v%2Bi2dGiwOmA0SY7ce7%3DZ3cHdbB6UD9838o%2BiaQ%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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/CAHt2gK_SJPnsQFJ9dHFf3rWz-%2Brxm9dAfydzNsO3uF9e4HoMXg%40mail.gmail.com.