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: duplicate worklets code the smart way #6827

Open
wants to merge 11 commits into
base: @tjzel/worklets/restructure-worklets-source-sets
Choose a base branch
from

Conversation

tjzel
Copy link
Collaborator

@tjzel tjzel commented Dec 17, 2024

Summary

In the transitional period of react-native-worklets coming as a separate package, Reanimated should work with or without react-native-worklets installed. This requires the code of Worklets to be present both in react-native-reanimated and react-native-worklets.

This PR duplicated that code using hard links, so nothing is effectively duplicated. Worklet files remain committed in react-native-reanimated for the time being and they are hard linked when executing yarn build in react-native-worklets workspace.

I moved ReanimatedVersion.cpp/h files back to Reanimated. We'll implement version checking for Worklets when we actually need it.

Test plan

Run an Example with these changes.

Then do yarn add react-native-worklets (it will use workspace version by default) in the example directory and run it again.

@tjzel tjzel force-pushed the @tjzel/worklets/restructure-worklets-source-sets branch from b30c495 to 2634199 Compare January 20, 2025 17:33
@tjzel tjzel force-pushed the @tjzel/worklets/duplicate-reanimated-code branch from d723ecc to 62c9488 Compare January 21, 2025 09:02
@tjzel tjzel marked this pull request as ready for review January 21, 2025 11:15
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