Skip to content

Releases

@react-native-gpui/testing 0.87.0-alpha.4

Choose a tag to compare

  • Published from CI through npm trusted publishing (OIDC) instead of an npm token.
npm install @react-native-gpui/testing@0.87.0-alpha.4

npm: 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

Choose a tag to compare

  • The bundle module exports ensureBinaries(), which downloads the platform's VMs and hermesc when they are missing, and the compile step calls it too. A fresh install no longer needs fetch-binaries run 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.2

npm: 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

Pre-release

Choose a tag to compare

  • rngpui::createTurboModule also returns React Native's own modules (Networking, WebSocket, AppState, DeviceInfo, PlatformConstants, Blob, FileReader and the default modules), so fetch, XMLHttpRequest and WebSocket work in a runtime a library starts, such as a worker. The dev, LogBox and Animated modules stay with the main runtime.
  • rn-gpui sets gpui-fast's renamed style field fast_overflow_clips_corners (it was overflow_clips_corners) to clip a view's children to its rounded corners; the Styled::overflow_clips_corners() method is unchanged. gpui-fast is pinned to f8229b9, which has the rename and keeps its changes to upstream GPUI's files small (script/check-upstream passes). The pin is in Cargo.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 of rn-gpui-module, polyfills, GPUI_PIN.md and LOOM_PIN.md are 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.6

npm: 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

Choose a tag to compare

  • Published from CI through npm trusted publishing (OIDC) instead of an npm token.
npm install @react-native-gpui/codegen@0.87.0-alpha.3

npm: 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

Pre-release

Choose a tag to compare

  • package-desktop builds in packaging/ inside the target directory. It used to relink and strip the binary in release/, which run-desktop --release (and a test-driver build) also uses, so that binary failed to load its libraries afterwards.
  • The dSYM package-desktop writes, 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-desktop clears desktop/build/package before staging, so a file a bundle hook no longer produces is not shipped.
  • run-desktop and package-desktop call the JS engine's ensureBinaries() before bundling, so a first build downloads Hermes' VM and hermesc with progress instead of failing with "hermesc not found".
  • Reads renderer.js and js-engine.js from @react-native-gpui/core's internal/ 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.6

npm: 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

Choose a tag to compare

Prebuilt C++ runtime for react-native-gpui (input hash 4efa8c3aee73f27d93849c9bf7271fac4ea0ae5504e8e656b829201002b561ed).

@react-native-gpui/prebuilt-binaries 0.0.15

Choose a tag to compare

Prebuilt C++ runtime for react-native-gpui (input hash b8a2aade17907c26908b3c6fb3ae833e25f9ea9a6d9a969d07cbacb45cabb544).

@react-native-gpui/testing 0.87.0-alpha.3

Choose a tag to compare

  • A waitForIdle the app does not answer in time reports what it was doing: the busy sources if idleStatus answers, or that the main thread is stalled, and the last lines of the app's log.
  • waitForIdle waits for a Rust module promise call made in the last second that has not settled, such as DesktopWindow.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.3

npm: 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

Pre-release

Choose a tag to compare

  • The prebuilt runtime is published for Fabric only for now. scripts/prebuilt-renderers.mjs lists the renderers the workflow builds and the pin check expects; an app that selects Loom builds it from source.

  • The test driver's scroll starts 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.h carries 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's screenshot of 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=1 makes the driver log each capture's time on stderr.

  • Experimental: with RN_GPUI_TEST_HEADLESS=1, a test-driver build 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, and screenshot draws the scene offscreen with Metal where a GPU is available and on the CPU (tiny-skia) where it is not, or always with GPUI_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; see docs/desktop-testing.md. Needs gpui-fast de5ebfa.

  • On Windows, the Loom runtime no longer fails to compile with Cannot open include file: 'unistd.h': Loom's LoomBindingInternals.h includes 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 jsThread main), and the time to the final frame by about 4 ms with jsThread background, 4–18 ms with main. Needs gpui-fast 8ddec44.

  • 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/reanimated with 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.gz in the same release; the pin file has a loom section 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, and project.desktop.prebuilt always can 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_THREAD no longer changes it at launch. Set it in desktop/desktop.json, or with RN_GPUI_JS_THREAD or --js-thread for a build; a change rebuilds the Rust part of the runtime.

  • With the Loom renderer, a NativeRoot without a height (or a width, with fitWidth) and a NativeSlot take 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 Loom 4245aca.

  • 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 NativeRoot without a height (or, with fitWidth, 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. A NativeSlot gets 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-fast bdecaba.

  • 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 -O2 React 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 under MAX_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_BASEDIR for MSVC, which ccache rejected in the verbatim form (\\?\D:\...) canonicalize returns, and which, once accepted, made include paths longer than MAX_PATH. ccache still caches MSVC builds, but not across checkouts.

  • open_window no longer warns about an unused mut when built for macOS or Windows.

  • Global shortcuts no longer warn that Modifiers::SUPER is deprecated: the platform key is Modifiers::META, which global-hotkey already turned SUPER into, so the shortcuts registered are the same.

  • A faded view (opacity below 1) whose nested views change no longer shows its content unfaded for a frame: gpui-fast 3bd25f1 builds a view that paints an effect group again instead of splicing it around the changed views.

  • On Windows, text inside a maskChildren mask or a view with opacity below 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 Text paints 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-fast 3efc3d0.

  • Moving focus, such as clicking a focusable view, no longer builds every view in the window again: gpui-fast 74dcd1f marks 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 layoutStats reports views, the number of React Native views mounted.

  • A change between mouse and keyboard input builds only the ...

Read more

@react-native-gpui/codegen 0.87.0-alpha.2

Choose a tag to compare

  • The context of a component in a native tree runs with_window in the window the tree is shown in (the new NativeCall::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> reads true) instead of zero, as a Fabric node does.
npm install @react-native-gpui/codegen@0.87.0-alpha.2

npm: https://www.npmjs.com/package/@react-native-gpui/codegen/v/0.87.0-alpha.2
Documentation: https://streetwriters.github.io/react-native-gpui/