pls: does annybody know, or has an idea ?: what is...
# webassembly
d
pls: does annybody know, or has an idea ?: what is size overhead of a simple wasm generated through kotlin ? one simple thing that I might want to do is calculate normals for a 3d mesh that is passed as SharedArrayBuffer form js
r
It depends on what do you use in your project.
A one-liner hello world compiled to wasm and optimized with binaryen is 5415 bytes for me.
but you will surely want to use some libraries
d
well, that is nice to know. Ofc libs will be needed. But do I really need a lib to do some math on few 3d points and put result into another buffer ?
could you share, or is there a sample project hello world that is 5k wasm. a project with mentioned optimizer included in the process ?
r
I just took an example project from my kilua framework, and removed everything but a single println(). You could start with this as well if you don't find anything better: https://github.com/rjaros/kilua/tree/main/examples/hello-world
❤️ 1
d
Thanks a lot for the example. I primarily use Java and JavaScript on daily basis. Currently evaluating practical ways to produce some things in WASM for performance critical parts. I would prefer to use Kotlin or JAva instead of C++ or Rust ... etc. if the size overhead will not be too big.