LiquidPlayer/LiquidCore

How to build liquidcore-xxx-x.x.x.aar files?

MihaelIsaev opened this issue · 2 comments

I'm trying to use webassembly and faced with issue that compiled cache works only with node between 12 and 13 versions, in version 10.x.x it doesn't work unfortunately.
I realized that current version of node in liquidcore is 10.15.3 so I forked the repo, updated node files to version 12.22.2 and replaced all the mentions in files with the newer version. It seems that the last step is to compile aar files but I don't know how. @ericwlange could you please give me some instructions?
My goal is to make sure that v8.serialize and v8.deserialize works with WebAssembly.Module object in node v12.22.2 and stick to it, and if not then try another version.
Thank you in advance!

Experience with node v12-13 is described here nodejs/node#18265 (comment)

Unfortunately this is not trivial. You have to build the V8 static libraries separately (see here) and then make sure you are including all of the correct files in CMakeLists.txt in both LiquidV8 and LiquidCore.

Oh, and these need to be updated as well to align with the new version of node: https://github.com/LiquidPlayer/LiquidCore/tree/master/LiquidCore/src/common

I have very old, outdated instructions here: https://github.com/LiquidPlayer/LiquidCore/wiki/How-to-build-libnode.so, but this was based on Node 8.9 which I replaced a long time ago. I completely changed how this gets built because of the need to make it work on iOS.

If you don't have practical knowledge of C++ and the CMake build system, this might be a bit challenging. If you are comfortable with those technologies, then it is doable for Android, but requires patience. iOS is a whole other story, and the main reason I haven't updated to Node 12/14+.

For your specific use case, you may be able to get away with just building a newer version of the static V8 libraries. You don't really need an updated version of node, you need an updated version of V8. I have no idea if there are incompatibilities between the two (the pessimist in me assumes there will be), but it could be worth a try.