Repository navigation
Releases
@react-native-gpui/testing 0.87.0-alpha.4
- Published from CI through npm trusted publishing (OIDC) instead of an npm token.
npm install @react-native-gpui/testing@0.87.0-alpha.4npm: https://www.npmjs.com/package/@react-native-gpui/testing/v/0.87.0-alpha.4
Documentation: https://streetwriters.github.io/react-native-gpui/
@react-native-gpui/hermes 0.87.0-alpha.2
- The bundle module exports
ensureBinaries(), which downloads the platform's VMs andhermescwhen they are missing, and the compile step calls it too. A fresh install no longer needsfetch-binariesrun by hand. The download shows its progress on a terminal, and the error when it fails names the script's full path instead of an npm workspace command. - Published from CI through npm trusted publishing (OIDC) instead of an npm token.
npm install @react-native-gpui/hermes@0.87.0-alpha.2npm: https://www.npmjs.com/package/@react-native-gpui/hermes/v/0.87.0-alpha.2
Documentation: https://streetwriters.github.io/react-native-gpui/
@react-native-gpui/core 0.87.0-alpha.6
rngpui::createTurboModulealso returns React Native's own modules (Networking, WebSocket, AppState, DeviceInfo, PlatformConstants, Blob, FileReader and the default modules), sofetch,XMLHttpRequestandWebSocketwork in a runtime a library starts, such as a worker. The dev, LogBox and Animated modules stay with the main runtime.rn-gpuisets gpui-fast's renamed style fieldfast_overflow_clips_corners(it wasoverflow_clips_corners) to clip a view's children to its rounded corners; theStyled::overflow_clips_corners()method is unchanged. gpui-fast is pinned tof8229b9, which has the rename and keeps its changes to upstream GPUI's files small (script/check-upstreampasses). The pin is inCargo.lock, a prebuilt hash input, so the next release has a new prebuilt.- The package ships less: its own metro, renderer and JS engine helpers moved into
internal/, and the maintainer-only scripts (generate-prebuilt-inputs,check-standalone-cmake,check-prebuilt-pin,check-loom-overrides,prebuilt-renderers), the integration tests ofrn-gpui-module,polyfills,GPUI_PIN.mdandLOOM_PIN.mdare no longer published. Files an app or the build imports by path are where they were, and the prebuilt runtime's input hash is unchanged. - Published from CI through npm trusted publishing (OIDC) instead of an npm token.
npm install @react-native-gpui/core@0.87.0-alpha.6npm: https://www.npmjs.com/package/@react-native-gpui/core/v/0.87.0-alpha.6
Documentation: https://streetwriters.github.io/react-native-gpui/
@react-native-gpui/codegen 0.87.0-alpha.3
- Published from CI through npm trusted publishing (OIDC) instead of an npm token.
npm install @react-native-gpui/codegen@0.87.0-alpha.3npm: https://www.npmjs.com/package/@react-native-gpui/codegen/v/0.87.0-alpha.3
Documentation: https://streetwriters.github.io/react-native-gpui/
@react-native-gpui/cli 0.87.0-alpha.6
package-desktopbuilds inpackaging/inside the target directory. It used to relink and strip the binary inrelease/, whichrun-desktop --release(and atest-driverbuild) also uses, so that binary failed to load its libraries afterwards.- The dSYM
package-desktopwrites, and the copy it puts beside the packages, are writable all the way down, so the next build can replace them ("failed to remove file … Operation not permitted"). package-desktopclearsdesktop/build/packagebefore staging, so a file a bundle hook no longer produces is not shipped.run-desktopandpackage-desktopcall the JS engine'sensureBinaries()before bundling, so a first build downloads Hermes' VM andhermescwith progress instead of failing with "hermesc not found".- Reads
renderer.jsandjs-engine.jsfrom@react-native-gpui/core'sinternal/folder, so it needs the core release that moved them. - Published from CI through npm trusted publishing (OIDC) instead of an npm token.
npm install @react-native-gpui/cli@0.87.0-alpha.6npm: https://www.npmjs.com/package/@react-native-gpui/cli/v/0.87.0-alpha.6
Documentation: https://streetwriters.github.io/react-native-gpui/
@react-native-gpui/prebuilt-binaries 0.0.16
Prebuilt C++ runtime for react-native-gpui (input hash 4efa8c3aee73f27d93849c9bf7271fac4ea0ae5504e8e656b829201002b561ed).
@react-native-gpui/prebuilt-binaries 0.0.15
Prebuilt C++ runtime for react-native-gpui (input hash b8a2aade17907c26908b3c6fb3ae833e25f9ea9a6d9a969d07cbacb45cabb544).
@react-native-gpui/testing 0.87.0-alpha.3
- A
waitForIdlethe app does not answer in time reports what it was doing: the busy sources ifidleStatusanswers, or that the main thread is stalled, and the last lines of the app's log. waitForIdlewaits for a Rust module promise call made in the last second that has not settled, such asDesktopWindow.open()while the window is being created;ignore: ['modules']skips them. The native side of this is in@react-native-gpui/core.
npm install @react-native-gpui/testing@0.87.0-alpha.3npm: https://www.npmjs.com/package/@react-native-gpui/testing/v/0.87.0-alpha.3
Documentation: https://streetwriters.github.io/react-native-gpui/
@react-native-gpui/core 0.87.0-alpha.5
-
The prebuilt runtime is published for Fabric only for now.
scripts/prebuilt-renderers.mjslists the renderers the workflow builds and the pin check expects; an app that selects Loom builds it from source. -
The test driver's
scrollstarts a new wheel sequence each time it is called without a phase. gpui-fast latches wheel ticks less than 500 ms apart to the container the first one went to, so a second scroll sent straight after the first, at the same point, no longer stays on the first container. -
On Windows, C sources compiled with the runtime's preinclude header (lexbor, for one) no longer fail with
STL1003:msvc-preinclude.hcarries its standard-library includes only for C++. The header is an input of the prebuilt runtime, so the next release has a new prebuilt. -
gpui-fast is pinned to
1ad3cc3. The test driver'sscreenshotof an element draws only that element's device-pixel region (Window::render_region_to_image) instead of the whole frame cropped afterwards, which makes headless captures of small elements faster.RN_GPUI_TEST_SCREENSHOT_TIMING=1makes the driver log each capture's time on stderr. -
Experimental: with
RN_GPUI_TEST_HEADLESS=1, atest-driverbuild runs on GPUI's test platform instead of AppKit, X11/Wayland or Win32, with the same bundle, bootstrap and driver socket. No window, display or window server is used, andscreenshotdraws the scene offscreen with Metal where a GPU is available and on the CPU (tiny-skia) where it is not, or always withGPUI_TEST_RENDERER=cpu. It runs inside a macOS sandbox that has no window server. The CPU renderer does not draw effect groups (group opacity, blur and drop-shadow filters), blend modes, masks or native views, and shell features (menus, Dock menu, tray, system clipboard, window activation and states, the accessibility tree, displays) are not available; seedocs/desktop-testing.md. Needs gpui-fastde5ebfa. -
On Windows, the Loom runtime no longer fails to compile with
Cannot open include file: 'unistd.h': Loom'sLoomBindingInternals.hincludes it and calls nothing from it, so the Loom header variants carry an MSVC stand-in that forwards to the real header everywhere else. -
On Windows, the Loom renderer extracts its downloaded archive with the tar that ships with the OS, so a build from a Git Bash session no longer fails with
tar: Cannot connect to C: resolve failed. -
A native root whose size changes with its tree (a page switch, a revisited page) now settles before the next display tick instead of one tick per round between the tree and the layout: while the window holds its last frame, the runtime draws the tree as soon as a batch is applied, so the root's size is reported in the same tick. Holds on revisited pages drop from 17 to 4 of 26 (0 with
jsThreadmain), and the time to the final frame by about 4 ms withjsThreadbackground, 4–18 ms with main. Needs gpui-fast8ddec44. -
With the Loom renderer, React Native's shared animation backend runs: the runtime provides its frame source, asking for frames while an animation runs and delivering one with each, so animation libraries such as Reanimated write animated props through the backend and Loom mounts them in the same frame, with no commit. An animation running through the backend counts as busy for the test driver's idle tracking, as a native animation driver does with Fabric, and a reload starts with the frame source stopped. Reanimated's layout animations on Loom need
@react-native-gpui/reanimatedwith its Loom adapter. -
The prebuilt runtime is published for the Loom renderer too: the prebuilt-binaries workflow builds each platform twice, against React Native and against Loom's React Native tree, and publishes
prebuilt-binaries-loom-<platform>.tar.gzin the same release; the pin file has aloomsection with its own input hash, which includes the pinned Loom and its header variants. A Loom app uses its archive under the same rules as a Fabric one, andproject.desktop.prebuiltalwayscan be used with Loom. Before, the Loom runtime always built from source. -
With the Loom renderer, where JavaScript runs (
jsThread) is fixed when the app is built, as Loom's iOS and Android builds fix it:RN_GPUI_JS_THREADno longer changes it at launch. Set it indesktop/desktop.json, or withRN_GPUI_JS_THREADor--js-threadfor a build; a change rebuilds the Rust part of the runtime. -
With the Loom renderer, a
NativeRootwithout a height (or a width, withfitWidth) and aNativeSlottake the size the runtime measures as the node's Loom measured size, which React commits do not replace; it was never applied, and pages of native roots stayed collapsed, overlapping and without content. A root also starts at its remembered size, as under Fabric. Needs Loom4245aca. -
A press on a native root's content (a kit
TextView, for one) is no longer stopped by the React Native views around it when the root itself has no touch handlers, so the native elements see the whole press: dragging selects text, a click clears a selection, and the release ends it. The views around it still get their touch events. -
A
NativeRootwithout a height (or, withfitWidth, a width) of its own no longer renders its component again when the runtime has measured its tree: the size goes into the node's Fabric state, which Yoga reads, so a measurement is one layout and commit. ANativeSlotgets the width the tree gives it the same way, without a render of the slot or its root. The box also starts at the size an earlier tree with the same element types and primitive props was measured at (a revisited page, identical badges), and corrects it when the measurement differs, so the window holds its last frame for new roots much less often and for less time. -
A page of native roots (
NativeRoot, and the kit components built on it) no longer shows its first frames at sizes that are about to change: a root that has just appeared, with its tree or its height still to arrive (not the content of its slots), makes the window keep showing its last frame, for at most 250 ms, until it has its size, and again if its tree grows within that time. A window that is being scrolled is not held, nor one that has already held for 200 ms in the last second, so roots that mount one after another cannot keep it on its last frame. The new page then appears in one frame at its final layout, instead of sections overlapping and moving into place. Needs gpui-fastbdecaba. -
On Windows, a Debug build that compiles glog from source no longer fails with
D8016: '/RTC1' and '/O2' command-line options are incompatible: the-g -O2React Native's glog build adds are dropped for MSVC, where the build type sets debug info and optimization. -
On Windows, a C++ build no longer fails with
C1083: Cannot open compiler generated file: ''when a checkout's path is long: the CMake tree is named by architecture (x64,arm64) instead of the target triple, which keeps the longest ReactCommon object files underMAX_PATH, the limit cl.exe cannot write past. A cached object (ccache hit) never ran the compiler, so the failure showed only on a miss. -
On Windows, a build with ccache installed no longer fails: the build no longer sets
CCACHE_BASEDIRfor MSVC, which ccache rejected in the verbatim form (\\?\D:\...)canonicalizereturns, and which, once accepted, made include paths longer thanMAX_PATH. ccache still caches MSVC builds, but not across checkouts. -
open_windowno longer warns about an unusedmutwhen built for macOS or Windows. -
Global shortcuts no longer warn that
Modifiers::SUPERis deprecated: the platform key isModifiers::META, whichglobal-hotkeyalready turnedSUPERinto, so the shortcuts registered are the same. -
A faded view (
opacitybelow 1) whose nested views change no longer shows its content unfaded for a frame: gpui-fast3bd25f1builds a view that paints an effect group again instead of splicing it around the changed views. -
On Windows, text inside a
maskChildrenmask or a view withopacitybelow 1 is drawn again: text in an effect group is no longer drawn with subpixel (ClearType) rendering, which left no alpha in the group. -
A mounted view costs a fraction of the memory it did: on a grid of 10,000 text cells (21,000 views) the heap is about 13 KB per view, from 35 KB, and the physical footprint about 475 MB, from 810 MB; the renderer's share is about 6.6 KB, and no longer grows with the depth of the tree. Most of what is left is React Native's own shadow tree. Each view has one layout node (3.4 before): pointer handling wraps the view's element instead of adding a child, a
Textpaints its paragraph without a node of its own unless it clips to rounded corners or is translucent, and a view that takes no focus gets a focus handle only when it is pressed, focused by the test driver, or a screen reader is running. The pointer handlers of views alike are shared, a view registers three pointer listeners instead of seven, scroll state is kept only by scroll views and text-input state only by text inputs, the view props that are rarely set are kept out of line, extension props are kept parsed rather than also as JSON, and component names are shared. Needs gpui-fast3efc3d0. -
Moving focus, such as clicking a focusable view, no longer builds every view in the window again: gpui-fast
74dcd1fmarks only the views that read the focus state of the elements that gained and lost it, and draws the rest from the last frame. Unmounting 5,000 cells built 10,514 views before and builds 7 now. -
After a large tree is unmounted, or a window draws nothing for a second, the renderer gives back what its frames needed beyond what is on screen: element arena chunks, the spare frame's lists and the slack of the drawn frame's.
-
The test driver's
layoutStatsreportsviews, the number of React Native views mounted. -
A change between mouse and keyboard input builds only the ...
@react-native-gpui/codegen 0.87.0-alpha.2
- The context of a component in a native tree runs
with_windowin the window the tree is shown in (the newNativeCall::window), so a command that needs a window works there too. - A component in a native tree reads a scalar prop that is not set as the default its spec declares (
WithDefault<boolean, true>readstrue) instead of zero, as a Fabric node does.
npm install @react-native-gpui/codegen@0.87.0-alpha.2npm: https://www.npmjs.com/package/@react-native-gpui/codegen/v/0.87.0-alpha.2
Documentation: https://streetwriters.github.io/react-native-gpui/