-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including opencv native libraries as resources in enso runner binary #11807
Conversation
These are the libraries we care about when it comes to packaging enso.$ unzip -l built-distribution/enso-engine-*/enso-*/lib/Standard/Image/0.0.0-dev/polyglot/java/opencv-4.7.0-0.jar | grep -v class$ | cut -c31- | grep -v /$ | grep ^nu | grep -v README
nu/pattern/opencv/linux/ARMv7/libopencv_java470.so
nu/pattern/opencv/linux/ARMv8/libopencv_java470.so
nu/pattern/opencv/linux/x86_64/libopencv_java470.so
nu/pattern/opencv/osx/ARMv8/libopencv_java470.dylib
nu/pattern/opencv/osx/x86_64/libopencv_java470.dylib
nu/pattern/opencv/windows/x86_32/opencv_java470.dll
nu/pattern/opencv/windows/x86_64/opencv_java470.dll when we select just the binary for the right platform (like 3b826f0 does), we go down from 441MB to 265MB on Linux. |
Doesn't this render |
There has been some progress already:
It is hard to go lower (with the resource based approach) when the
On Friday @jdunkerley sounded like wanting the quickest solution without waiting for any classloading changes, build system changes, etc. that are associated with #11483. |
Happy for us to build the better approach for this if not hideous to do so. |
Pull Request Description
test/Image_Tests
can now be executed in native image mode ofenso
runner. All that's needed is to include (the right) native_libraries present inopencv-4.7.0-0.jar
as resources in the native image binary. This is another step in the #10121 quest.Important Notes
bin/enso
executable went up too much - e.g. from ~200MB to 441MBStandard.Image
: Implementpolyglot/lib
#11483libopencv.so
has ~65MB itself, it seems natural the binary grew by such amountStandard.Image
: Implementpolyglot/lib
#11483 we would do even better: thebin/enso
executable would stay ~200MB and it would load the 65MBlibopencv.so
fromlib/Standard/Base/polyglot/lib/linux/amd64/libopencv.so
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
TypeScript,
Rust
style guides.