Re: Combine multiple wasm files

2021-06-19 Thread 'Sam Clegg' via emscripten-discuss
What is the current mechanism for loading the wasm file you are supplying?
Are you using emscripten's dynamic linking capability (i.e. MAIN_MODULE +
SIDE_MODULE?).

If that answer is yes, and you are asking about linking a SIDE_MODULE into
the MAIN_MODULE ahead of time, its not something that is supported no.
Also, shared libraries (side moudles) are are only slightly more obfuscated
than object files and `.a` archives.  They are all in the wasm format which
is fairly easy to disassembly.  If you want to try to prevent decompilation
or disassembly you would need to do more than just ship as a shared library
(side module) you would also need to perform some kind of obfuscation,
which by its nature (and the nature of WebAssemlby in particular) is always
going to have limits.

On Sat, Jun 19, 2021 at 3:45 PM Mehaboob kk  wrote:

> Hello,
>
> Is it possible to combine multiple .wasm files to one single .wasm file?
>
> Scenario:
> I want to share a library(SDK) to an end customer who is building the
> .wasm/JS application. Customer concerned that loading multiple wasm files
> is not efficient. So we wanted to combine two wasm files. Although I can
> share static lib generated using Emscripten, its not preferred because .a
> file is easy to reverse compared to wasm right?
>
> Any inputs on this please?
>
> Thank you
>
> --
> 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/CAO5iXcCQC45LU%3DNMFev5PYjn%2BmzOOgDfhXx0ahDXq8GqKRVjJQ%40mail.gmail.com
> 
> .
>

-- 
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_va29zxMEFFi8gHEP5C0pBJ0idQh8qeqT%2B1S5v%3D9XO5BMKNA%40mail.gmail.com.


Re: Pre-initialize with Wizer

2021-06-19 Thread 'Sam Clegg' via emscripten-discuss
The emscripten feature only worked for running static constructors I
believe (We should resurrect that feature in binaryen!).  Wizer actually
tries to run as much of `main` as it can too.

I don't see any reason why emscripten and wizer couldn't be used together
but I don't know of any attempts to do so.  One wrinkle is that, unlike
with wasi executables, not all emscripten programs have a single `main`
entry point, but act more like libraries for JS programs.

On Sat, Jun 19, 2021 at 8:31 AM 'Thomas Lively' via emscripten-discuss <
emscripten-discuss@googlegroups.com> wrote:

> I believe Emscripten used to have a similar feature, but we had to disable
> it because it turned out that we depended on JS setting some values in
> memory before running the Wasm code and the pre-evaluation tool couldn’t
> account for that. I’m not sure whether that situation has changed, though.
>
> On Fri, Jun 18, 2021 at 21:51 Dan C  wrote:
>
>> Hi everyone,
>>
>> I recently came across this tool
>> https://github.com/bytecodealliance/wizer, which doesn't seem designated
>> for Emscripten. I'm wondering whether anyone had any luck with it.
>>
>> Thanks,
>> Dan
>>
>> --
>> 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/f8abb27a-95b6-458c-bac9-35a9be0c31cfn%40googlegroups.com
>> 
>> .
>>
> --
> 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/CAJZD_EXGyjh_h8VVQ5y9Qza2V5m1D97M2Bh8tGM5AyhfDpYBhg%40mail.gmail.com
> 
> .
>

-- 
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-W%2BKbx8GczfqLNme1b-SN2nmuhwBFgVVkMcHwV0FuKDA%40mail.gmail.com.


Combine multiple wasm files

2021-06-19 Thread Mehaboob kk
Hello,

Is it possible to combine multiple .wasm files to one single .wasm file?

Scenario:
I want to share a library(SDK) to an end customer who is building the
.wasm/JS application. Customer concerned that loading multiple wasm files
is not efficient. So we wanted to combine two wasm files. Although I can
share static lib generated using Emscripten, its not preferred because .a
file is easy to reverse compared to wasm right?

Any inputs on this please?

Thank you

-- 
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/CAO5iXcCQC45LU%3DNMFev5PYjn%2BmzOOgDfhXx0ahDXq8GqKRVjJQ%40mail.gmail.com.


Re: Pre-initialize with Wizer

2021-06-19 Thread 'Thomas Lively' via emscripten-discuss
I believe Emscripten used to have a similar feature, but we had to disable
it because it turned out that we depended on JS setting some values in
memory before running the Wasm code and the pre-evaluation tool couldn’t
account for that. I’m not sure whether that situation has changed, though.

On Fri, Jun 18, 2021 at 21:51 Dan C  wrote:

> Hi everyone,
>
> I recently came across this tool https://github.com/bytecodealliance/wizer,
> which doesn't seem designated for Emscripten. I'm wondering whether anyone
> had any luck with it.
>
> Thanks,
> Dan
>
> --
> 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/f8abb27a-95b6-458c-bac9-35a9be0c31cfn%40googlegroups.com
> 
> .
>

-- 
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/CAJZD_EXGyjh_h8VVQ5y9Qza2V5m1D97M2Bh8tGM5AyhfDpYBhg%40mail.gmail.com.