Closed gamedevsam closed 1 year ago
In the optimize script I tried to use the binaryen's wasm toolchain optimizations. Those are different from LLVM / Clang optimizer which comes with C compilation. But it turned out that LLVM is already doing a great job and binaryen is not able to make further improvements. I kept the script there for future evaluations.
-v command just mounts a volume into the docker container. Basically it creates a shared folder between the container and the host so the container can read the source files and output the binary.
-u command sets the user used in the docker container to run the compiler. Sometimes it helps with fixing file permissions at the output files. But I'm not sure if it's useful in this case. I just copied this from a different project of mine.
Thanks for the clarifications, and exceptional work. I'm gonna be referencing this project anytime I need to compile some WASM!
I'm a newb when it comes to WASM, mind enlightening me about what the optimize script does (and maybe why it's a bad idea / commented out, or why it's only applied to bcrypt)?
Also using a docker container to get around all the native tooling requirements is so good.
If you don't mind another question, what do these options do on the docker run command?