Expose C++ TurboModule codegen

Summary:
This adjusts the previously unused (but fully working!) `rn_codegen_cxx_modules` rule to be consistent with the other codegen rules and calls it from the `rn_codegen` with the "JSI" suffix to not conflict with the other rules, and to match the convention established by hand-written C++ TurboModules.

Changelog:
Internal

Reviewed By: RSNara

Differential Revision: D34451208

fbshipit-source-id: 4d779b068dfa4f7fd73fd3bca354fffe86d01f73
This commit is contained in:
Scott Kyle
2022-02-28 17:08:03 -08:00
committed by Facebook GitHub Bot
parent 964e816752
commit a0a2958cda
6 changed files with 43 additions and 37 deletions
@@ -85,7 +85,7 @@ const FileTemplate = ({
* ${'@'}generated by codegen project: GenerateModuleH.js
*/
#include <react/modules/${libraryName}/NativeModules.h>
#include "${libraryName}JSI.h"
namespace facebook {
namespace react {
@@ -221,7 +221,7 @@ module.exports = {
})
.join('\n');
const fileName = 'NativeModules.cpp';
const fileName = `${libraryName}JSI-generated.cpp`;
const replacedTemplate = FileTemplate({
modules,
libraryName,