chore(gpui): vendor the experimental native runtime

This commit is contained in:
Mohamed Boudra
2026-11-02 02:19:36 +01:00
parent e02fa9a5f8
commit 5518c25ac5
575 changed files with 129495 additions and 3 deletions
@@ -0,0 +1,29 @@
#include "RNModule.hpp"
#include <RNModuleSpec.h>
#include <memory>
#include <string>
#include <utility>
namespace {
namespace jsi = facebook::jsi;
using facebook::react::CallInvoker;
using facebook::react::TurboModule;
class RNModule final : public facebook::react::NativeModuleSpec<RNModule> {
public:
explicit RNModule(std::shared_ptr<CallInvoker> jsInvoker)
: NativeModuleSpec(std::move(jsInvoker)) {}
std::string greet(jsi::Runtime&, std::string name) {
return "Hello from C++, " + name + "!";
}
};
} // namespace
std::shared_ptr<TurboModule> create_rn_module(
const std::string& name,
std::shared_ptr<CallInvoker> jsInvoker) {
return rngpui::provideTurboModule<RNModule>(name, std::move(jsInvoker));
}