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

[RNKC-051] - fabric support #64

Merged
merged 45 commits into from
Sep 19, 2022
Merged

[RNKC-051] - fabric support #64

merged 45 commits into from
Sep 19, 2022

Conversation

kirillzyusko
Copy link
Owner

@kirillzyusko kirillzyusko commented Sep 9, 2022

Description

Added basic support for new (fabric) architecture.

Motivation and Context

The reason of prioritising a fabric adoption is an ability to perform sync communication between Native and JS thread. Especially it may become handy during the implementation of interactive keyboard on Android.

Current implementation allows to use both (old - paper, and new - fabric) architectures.

Unfortunately, it seems like Swift is not supported in new arch, so I had to rewrite some files to ObjC. I hope at some point of time we will bring it back to Swift.

For fabric adoption I used this repo as an example of how to add a basic support.

Changelog

CI

  • added cpplint as C++ codebase most likely will be increased over development iterations;

JS

  • which exposes isFabricEnabled and isTurboModuleEnabled variables;
  • added View/Modules specification for new arch;

iOS

  • changed files extension from .m to .mm to support C++;
  • added fabric support;

Android

  • added fabric support;

How Has This Been Tested?

Tested manually on:

  • iPhone 11 (iOS 15.5, simulator);
  • Pixel 3 (API 32, emulator).

Checklist

  • CI successfully passed

@kirillzyusko kirillzyusko added enhancement New feature or request 🏭 fabric Changes specific to new (fabric/jsi) architecture labels Sep 9, 2022
@kirillzyusko kirillzyusko self-assigned this Sep 13, 2022
} from 'react-native/Libraries/Types/CodegenTypes';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';

type KeyboardMoveEvent = Readonly<{
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think similar data structure is already defined as NativeEvent in native.ts. Would it be possible to use one source of truth?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving type declaration into separate file will cause an error during pods installation 🤷‍♂️

@kirillzyusko kirillzyusko marked this pull request as ready for review September 19, 2022 11:57
@kirillzyusko kirillzyusko merged commit f6b1fa0 into main Sep 19, 2022
@kirillzyusko kirillzyusko deleted the feature/fabric branch September 19, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🏭 fabric Changes specific to new (fabric/jsi) architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant