Skip to content

Add webfront/Bridge.hpp, a light header for units that only use the bridge (#766) - #795

Open
ambroise-leclerc wants to merge 12 commits into
767-store-starterfrom
766-light-header
Open

ambroise-leclerc wants to merge 12 commits into
767-store-starterfrom
766-light-header

Conversation

@ambroise-leclerc

Copy link
Copy Markdown
Collaborator

Refs #766. Completes the work started in #785. Stacked on #794.

What changes

  • webfront/Bridge.hpp: BridgeUI (jsFunction, jsFunction<R>) and BridgeFunctions (cppFunction, with caller requirements) for units that only use the bridge. The application unit creates them with webfront::bridgeUI(ui) and webfront::bridgeFunctions(app) (BridgeHost.hpp). The wire format is unchanged.
  • Signature, decoding and TypeScript name helpers moved to details/.
  • Two-unit tests: unit tests, the consumer project and a browser spec.
  • ADR-029 (proposed), docs/BUILD_TIME_STUDY.md, README, changelog.

Measurements (GCC 16.1, -O3, medians of 3)

  • Secondary unit calling jsFunction: 17.8 s with WebFront.hpp, 2.3 s with Bridge.hpp.
  • Test unit with 8 functions and 2 JavaScript calls: 5.4 s.
  • HelloWorld.cpp: 35.6 s before, 32.8 s after (within noise).

Not met

  • The 30 % reduction on HelloWorld.cpp: it instantiates the whole application and server.
  • No MSVC timing and no CI timing step.
  • Bridge.hpp has no deferred callbacks (sender, coroutine, Stream), no jsFunctionSender, no registration on a Space.
  • C++ modules still not adopted (GCC 16.1 internal compiler error; Clang 22 fails on the import in stdexec).

Checks

Stack head, WebKitGTK tree without the web integration label: 825/825, one CUDA case skipped.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants