From e42a52157178eca7fba9b8c8a749fe1781e4a04a Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Mon, 11 Mar 2024 13:48:42 -0700 Subject: [PATCH] Fusebox/RDT: setup global for fusebox runtime (#43418) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43418 Changelog: [Internal] This diff adds a script, which will be later imported from `InitializeCore` to setup a required global for communication between React Native runtime (RDT Backend in it) and Chrome DevTools Frontend (RDT Frontend in it). See README for the architecture overview and how bidirectional communication is established. Corresponding PR in Chrome DevTools frontend - https://github.com/facebookexperimental/rn-chrome-devtools-frontend/pull/15 Differential Revision: D54770207 --- .../Libraries/Core/fusebox/README.md | 12 ++ ...ackend-to-frontend.excalidraw-embedded.png | Bin 0 -> 547874 bytes ...rontend-to-backend.excalidraw-embedded.png | Bin 0 -> 404679 bytes .../Core/fusebox/setUpFuseboxRuntime.js | 106 ++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 packages/react-native/Libraries/Core/fusebox/README.md create mode 100644 packages/react-native/Libraries/Core/fusebox/assets/backend-to-frontend.excalidraw-embedded.png create mode 100644 packages/react-native/Libraries/Core/fusebox/assets/frontend-to-backend.excalidraw-embedded.png create mode 100644 packages/react-native/Libraries/Core/fusebox/setUpFuseboxRuntime.js diff --git a/packages/react-native/Libraries/Core/fusebox/README.md b/packages/react-native/Libraries/Core/fusebox/README.md new file mode 100644 index 00000000000000..5cb1918544a26d --- /dev/null +++ b/packages/react-native/Libraries/Core/fusebox/README.md @@ -0,0 +1,12 @@ +# Fusebox Runtime + +## What is Fusebox? +https://fburl.com/wut/j7u7kgal + +## Architecture + +### Frontend to Backend communication +![Frontend to backend communication diagram](./assets/frontend-to-backend.excalidraw-embedded.png) + +### Backend to Frontend communication +![Backend to frontend communication diagram](./assets/backend-to-frontend.excalidraw-embedded.png) diff --git a/packages/react-native/Libraries/Core/fusebox/assets/backend-to-frontend.excalidraw-embedded.png b/packages/react-native/Libraries/Core/fusebox/assets/backend-to-frontend.excal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