biggzlar / opencv_js_compiler

Forked from https://github.com/ucisysarch/opencvjs. Use n_make.py to build and link OpenCV and your project before compiling to javascript.
Other
9 stars 5 forks source link

Do not FORCE_FILESYSTEM=1 #3

Closed adishavit closed 7 years ago

adishavit commented 7 years ago

The build args have emcc_args = '-s FORCE_FILESYSTEM=1.
According to the docs:

Emscripten decides whether to include file system support automatically. Many programs don’t need files, and file system support is not negligible in size, so Emscripten avoids including it when it doesn’t see a reason to. That means that if your C/C++ code does not access files, then the FS object and other file system APIs will not be included in the output. And, on the other hand, if your C/C++ code does use files, then file system support will be automatically included. So normally things will “just work” and you don’t need to think about this at all.

Consider removing this from default build args, and maybe make it into an opt-in command line option.

adishavit commented 7 years ago

For some reason, even after removing it and removing all the called to FS in the cpp and html, the resulting js file size is the same.

biggzlar commented 7 years ago

This was an added demo of the virtual filesystem and how to interact with it. Removed those features from the example.cpp and index.html because they are not relevant for the current project.

biggzlar commented 7 years ago

By the way: no idea why the size remains the same...

adishavit commented 7 years ago

So will you be making a commit that removes this?

On Sun, Jun 4, 2017 at 2:14 PM, Lennart notifications@github.com wrote:

By the way: no idea why the size remains the same...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/biggzlar/opencv_js_compiler/issues/3#issuecomment-306033787, or mute the thread https://github.com/notifications/unsubscribe-auth/ABuxEOVqHCFbbrqIWOTEsXWuq8elOp-bks5sApGggaJpZM4NvSxI .