Provide Javascript-only bindings for dotlottie-rs #169
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Currently, the dotlottie-rs player provides WASM/Kotlin/Swift bindings. The WASM bindings are isomorphic and can run in both the browser and Node.js or any WASM runtime. But, it requires an additional step to load the WASM file either from a CDN or by self-hosting it within the user's application.
While this is the optimal approach for loading the player on the web (since the user doesn't need to load a large JavaScript file and can asynchronously load the WASM file), it may not be suitable for specific use cases. This includes scenarios when the user cannot load the WASM file over their application server or from a CDN.
To address these limitations, we propose exporting JavaScript-only bindings.
Proposed Solution:
Modify the Makefile to include instructions for Emscripten to output no WASM when make wasm is executed.
Build Configurations:
Ensure make wasm generates both WASM-only and JavaScript-only bindings.
For JavaScript-only bindings, pass the -sWASM=0 flag in the Emscripten command to disable WASM output.
The text was updated successfully, but these errors were encountered: