On Wed, Nov 9, 2022 at 1:41 PM Mark Sibly <marksi...@gmail.com> wrote:
> OK, making progress I think... > > emmalloc is smaller/simpler/maybe-less-efficient version of dlmalloc? > Basically yes. > > ww is webworker? I'm using posix threads so I should ignore and use mt > libs instead? > ww means wasm worker, which is an alternative way to use workers if you don't want pthreads. > > libc_optz is minimized for size, has no references to wasi? > libc_optz contains just a few optimized libc files. You still need libc.a or libc-mt.a. You can see how the different libraries are built here: https://github.com/emscripten-core/emscripten/blob/main/tools/system_libs.py#L1171-L1174 > > > > > > On Thu, Nov 10, 2022 at 10:03 AM Mark Sibly <marksi...@gmail.com> wrote: > >> Hi, >> >> I'm writing a little compiler for a new language which will output wasm >> for browsers and I'd like to be able to link it's wasm output with >> emscripten wasm output so I can write libraries for it in c/c++. >> >> However, I'm a bit confused about which sysroot libs I should be linking >> with, in particular, when I try to link with libc-mt.a I get the following >> error in the browser: >> >> Uncaught (in promise) TypeError: WebAssembly.instantiate(): Import #2 >> module="wasi_snapshot_preview1" error: module is not an object or function >> >> I don't know much about 'wasi' except it seems to be a 'posix-like' lib >> for wasm apps that don't run on the web, so I was a bit surprised to get >> this! >> >> I also tried libc-ww.a thinking 'ww' might be for 'web' or something but >> same problem, it's looking for wasi. >> >> What exactly are the 'ww' libs? I get 'mt is for multi-threaded and debug >> is debug but ww? Dit emmalloc vs dlmalloc? Static vs dynamic? >> >> I'll probably get there in the end through trial and error, but any hints >> would be greatly appreciated! >> >> Bye, >> Mark >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "emscripten-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/emscripten-discuss/PzwrSOCba6E/unsubscribe >> . >> To unsubscribe from this group and all its topics, 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/fa9b1c09-c54b-47c7-bf38-d7afcaf57eb6n%40googlegroups.com >> <https://groups.google.com/d/msgid/emscripten-discuss/fa9b1c09-c54b-47c7-bf38-d7afcaf57eb6n%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/CAK32ozidQHx_bBH8SMZmn6T9hUV38wQrZYRNFEYV%2BpZ8TvrLNA%40mail.gmail.com > <https://groups.google.com/d/msgid/emscripten-discuss/CAK32ozidQHx_bBH8SMZmn6T9hUV38wQrZYRNFEYV%2BpZ8TvrLNA%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/CAL_va28bLb%2B7pr32goYzd%2BKSO5Pox9ZthwE%3DgzMwuZdAPOp2Xw%40mail.gmail.com.