You need the source code for the .dll/.so and compile it to wasm via emscripten. Yes, wasm files are completely platform independent, but the source code the wasm is compiled from also must be platform-independent. Emscripten provides a number of portability wrapper which help a lot, but if (for instance) the Windows DLL calls Win32 API functions you first need to take care of those and translate them to APIs that are available on emscripten.
The porting section in the emscripten docs is a good starting point: https://kripken.github.io/emscripten-site/docs/porting/index.html On Monday, 3 September 2018 14:16:29 UTC+2, Varun Kumar wrote: > > I have a C library(.so). There are two versions of it - one for Windows > and another for Linux. What would be the right approach to convert it into > WebAssembly? Also, is the .wasm file completely platform independent? > -- 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.
