react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Add IRuntime interface

Open tsaichien opened this issue 5 days ago • 1 comments

Summary: After reviewing the feasibility of adding new Runtime functionality, we realized the current state of Runtime makes it hard/inconvenient to add new basic functionality. It requires creating a new interface (e.g. IRuntime2) to declare the new APIs. Then, everywhere it is needed, both the original Runtime and IRuntime2 needs to passed in to access both APIs.

After discussion, we decided to introduce IRuntime, which will declare most of the Runtime functionalities. All "protected" APIs, which made sense before interfaces were introduced, will now be public. The protected static methods of Runtime will remain as is for the Friends to access.

After we decided to cut "stable" (after incoming JSI improvements), new functionalities will be added in IRuntime2 interface. IRuntime2 will inherit IRuntime to make existing functionality easy to access.

Differential Revision: D89093651

tsaichien avatar Dec 17 '25 17:12 tsaichien

@tsaichien has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89093651.

meta-codesync[bot] avatar Dec 17 '25 17:12 meta-codesync[bot]