Skip to Content
Octapus

Comparing native and web

Use the Octapus dev tool to see your app natively and in WebKit side by side, and find what differs.

The dev tool is a macOS app that ships with the Octapus checkout. Run it from there:

pnpm devtool

It has two tabs: Octane, for checking an app, and Hermes, a JavaScript playground for the runtime itself.

The Octane tab

Edit .tsrx and CSS in the tab's editor (it starts from a sample project; paste in the components you want to check). Every edit rebuilds with oct build --target web,mac, bakes a snapshot and launches it, so you always see the current code.

Preview modes

ModeShows
NativeYour app drawn by Octapus with AppKit views
WebThe web build in a WebKit view
Side by sideBoth, next to each other
OverlayWeb on top of native, with an opacity slider

The Hydrate picker switches the hydration strategy so you can watch the snapshot, the takeover and held taps at each setting.

Inspectors

InspectorUse it to
Native vs WebFind layout differences: every element's position and size on both sides, with the difference
LaunchRead the launch metrics: phases, timings, held and replayed taps
FrameSee what the snapshot contains, row by row
BatchesFollow updates after launch: what caused each one, how long JS and native took
Host treeSee the native element tree your app produced
ConsoleRead console.log output from Hermes
CompiledRead what the compiler made of App.tsrx

The launch timeline above the preview shows snapshot read, draw, Hermes start and takeover with their durations. When the first render did not match the snapshot it shows where they differed.

The Hermes tab

A scratchpad for plain JavaScript on Hermes: edit code, it compiles to bytecode, and you can call any global function with JSON arguments and time repeated calls. Useful for checking whether a piece of logic is fast on Hermes before you put it in a component.

On this page