I have an application that contains libraries generated with emscripten. I am compiling them using the flags:
-s MODULARIZE=1 -s EXPORT_NAME=\"'SomeModuleName'\"
However, the library FS is no longer available. When I was compiling without the flags, I could use the library FS in any other script.
Is it possible to export FS in my module?
The FS module is not exported by default when using the flag
-s EXPORT_NAME="'SomeModuleName'"
If you want to export the module FS, you have to add the flag
-s 'EXTRA_EXPORTED_RUNTIME_METHODS=["FS"]'
Then you can access Module['FS']
or for this example it will be SomeModuleName['FS']
emscripten.
However, FS
is defined by each library and it won't be shared between them.
If you would like to have a 'common' shared space between libraries, you will need to use something like BrowserFS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With