Absytree
Absytree copied to clipboard
Compile to wasm instead of js
Currently the browser version is based on js
Problems:
- Slow (bad Nim->JS codegen, interaction with DOM (technically not necessary))
- Optimizations are either good for native and bad for js or the other way round
- E.g. Native prefers
object, stack allocation etc., JS prefersref objectand preventing copies
- E.g. Native prefers
- Lots of wrapping around APIs because JS backend and native backend are so different
- Issues with big int
Advantages of wasm:
- Closer to native backend ->
ptr,castetc work properly - Better performance
Rendering should probably switch to WebGL
Open questions:
- How to do interface between WASM <-> JS with async functions