Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(WASM): implement playback observer callbacks #273

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theashraf
Copy link
Member

@theashraf theashraf commented Dec 17, 2024

Problem:

  • dotLottie-rs WASM bindings are generated from the uniffi cpp bindings using emscripten.
  • uniffi cpp depends on an older version (0.25) of uniffi that lacks trait bindings, making it unfeasible to provide WASM bindings for the dotLottie observer.

Changes:

  • Introduce the wasm_observer_callbacks_ffi module a stable C-ABI interface for observer callbacks for wasm32 target
  • Provide a custom JavaScript implementation for wasm_observer_callbacks_ffi via emscripten_library.js using the --js-library flag.

This approach serves as an "escape hatch," allowing us to unblock state machine event integrations in the WASM environment. The trade-off is that we can no longer apply the closure compiler for minimized bundle sizes at this stage

Copy link

changeset-bot bot commented Dec 17, 2024

⚠️ No Changeset found

Latest commit: 64a0160

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@theashraf theashraf marked this pull request as ready for review December 17, 2024 05:33
@theashraf theashraf force-pushed the feat/observer-bindings-workaround branch from 066b77e to ad37a4f Compare December 17, 2024 06:03
@theashraf theashraf force-pushed the feat/observer-bindings-workaround branch from ad37a4f to 64a0160 Compare January 3, 2025 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant