Skip to content

Workletize top-level functions in a file with 'worklet' directive#5554

Merged
tjzel merged 21 commits intomainfrom
@tjzel/plugin/allow-file-workletization
Jul 17, 2024
Merged

Workletize top-level functions in a file with 'worklet' directive#5554
tjzel merged 21 commits intomainfrom
@tjzel/plugin/allow-file-workletization

Conversation

@tjzel
Copy link
Copy Markdown
Collaborator

@tjzel tjzel commented Jan 4, 2024

Summary

This pull request introduces the mechanism of auto-workletizing the top level of a file.

In a file marked with a worklet directive every top-level workletizable object (functions, objects with methods) gets workletized.

Test plan

  • Add unit tests
  • Add a runtime test suite

@nandorojo
Copy link
Copy Markdown
Contributor

looks correct to me!

@tjzel tjzel force-pushed the @tjzel/plugin/allow-file-workletization branch from 4f1920e to ecacb53 Compare July 2, 2024 10:34
@tjzel tjzel force-pushed the @tjzel/plugin/allow-file-workletization branch from 133377c to 13bfdf9 Compare July 8, 2024 11:06
@tjzel tjzel changed the base branch from main to @tjzel/plugin/extend-docs July 8, 2024 11:07
@tjzel tjzel requested review from bartlomiejbloniarz and tomekzaw and removed request for bartlomiejbloniarz July 8, 2024 11:48
@tjzel tjzel marked this pull request as ready for review July 8, 2024 11:48
Base automatically changed from @tjzel/plugin/extend-docs to main July 15, 2024 14:04
@Latropos Latropos self-requested a review July 15, 2024 15:12
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
…ftware-mansion#5554)

## Summary

This pull request introduces the mechanism of auto-workletizing the top
level of a file.

In a __file__ marked with a `worklet` directive every top-level
workletizable object (functions, objects with methods) gets workletized.

## Test plan

- [x] Add unit tests
- [x] Add a runtime test suite

---------

Co-authored-by: Aleksandra Cynk <ola.zn123@wp.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants