Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f30f88c
Give the HTTPS browser test program the light-header unit it register…
ambroise-leclerc Dec 6, 2026
c78e763
Measure image streams end to end with a manual benchmark (#769)
ambroise-leclerc Dec 6, 2026
8e56b53
Add the image stream example: JPEG frames on demand, typed-array pixe…
ambroise-leclerc Dec 6, 2026
02764f2
Record the image stream measurement on dispatch: WebView2, WKWebView …
ambroise-leclerc Dec 6, 2026
b38beda
Select the image stream track and record the measurements (#769)
ambroise-leclerc Dec 6, 2026
bd4fe41
Use the source header's thread and allocation values (#769)
ambroise-leclerc Dec 6, 2026
3c5fd2a
Record the WebView2 and WKWebView image stream measurements (#769)
ambroise-leclerc Dec 6, 2026
5cea610
Merge branch '764-window-services' into 769-bench-transports
ambroise-leclerc Dec 6, 2026
cf32c30
Give the Jetson encoder frames a new directory removed on exit (#769)
ambroise-leclerc Dec 6, 2026
38854b6
Fail the image stream benchmark when its report or a case is lost (#769)
ambroise-leclerc Dec 6, 2026
fec73b7
Time each decoded frame against the chunk of the same timestamp (#769)
ambroise-leclerc Dec 6, 2026
e025c4b
Make the host encoder timing script executable (#769)
ambroise-leclerc Dec 6, 2026
84198b0
Average the codec chunk size over the chunks processed (#769)
ambroise-leclerc Dec 6, 2026
7870095
Keep the benchmark alive until its application has drained the work t…
ambroise-leclerc Dec 6, 2026
364ca6a
Merge branch '764-window-services' into 769-bench-transports
ambroise-leclerc Dec 6, 2026
f88d23a
Merge branch '764-window-services' into 769-bench-transports
ambroise-leclerc Dec 6, 2026
54d3904
Name the BareNative repository in the Jetson jobs' guard (#769)
ambroise-leclerc Dec 6, 2026
c8ac5a1
Pin the BareNative repository in the hardware workflow audit (#769)
ambroise-leclerc Dec 6, 2026
ad6aaa4
Consume the installed package in C++26 only with a compiler that has …
ambroise-leclerc Dec 6, 2026
469a383
Let a Jetson dispatch run the image stream measurement alone (#769)
ambroise-leclerc Dec 6, 2026
029f956
Record the Jetson Orin Nano image stream figures and the encoder prob…
ambroise-leclerc Dec 6, 2026
f8863f7
Count the source ticks missed by a slow frame as skipped and never ca…
ambroise-leclerc Dec 6, 2026
8c09c73
Record the image stream figures measured with the corrected pacing (#…
ambroise-leclerc Dec 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/scripts/jetson-orin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,31 @@ common=(-G Ninja -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_ENABLE_TESTING=ON
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_SCAN_FOR_MODULES=OFF
-DCMAKE_JOB_POOLS=jetson_compile=1 -DCMAKE_JOB_POOL_COMPILE=jetson_compile
-DWEBFRONT_HOST_LOOP_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=87)
cmake -S . -B build-jetson-core "${common[@]}" -DWEBFRONT_EMBED_WEBKITGTK=OFF
cmake --build build-jetson-core --parallel 2
# Select one scenario directly: Bdd exits 4 if it skips for lack of a GPU. CTest permits skips.
build-jetson-core/test/unit/tests --exact 'Host loop: CUDA computes the image of the CPU, within the rounding of the device'
ctest --test-dir build-jetson-core --output-on-failure --no-tests=error --parallel 2 \
--output-junit core-results.xml
# A maintainer's dispatch may ask for the image stream measurement alone (docs/IMAGE_STREAMS.md): no test suite is built.
measure_only=${WEBFRONT_JETSON_MEASURE_ONLY:-false}
if [[ "$measure_only" != true ]]; then
cmake -S . -B build-jetson-core "${common[@]}" -DWEBFRONT_EMBED_WEBKITGTK=OFF
cmake --build build-jetson-core --parallel 2
# Select one scenario directly: Bdd exits 4 if it skips for lack of a GPU. CTest permits skips.
build-jetson-core/test/unit/tests --exact 'Host loop: CUDA computes the image of the CPU, within the rounding of the device'
ctest --test-dir build-jetson-core --output-on-failure --no-tests=error --parallel 2 \
--output-junit core-results.xml
fi
cmake -S . -B build-jetson-webkitgtk "${common[@]}" -DWEBFRONT_EMBED_WEBKITGTK=ON \
-DWEBFRONT_WEBTEST_FRONTEND=WebKitGTK -DWEBFRONT_BUILD_EXAMPLES=OFF
cmake --build build-jetson-webkitgtk --target webtest developer_integration webfront-wf --parallel 2
ctest --test-dir build-jetson-webkitgtk -L web-integration --output-on-failure --no-tests=error \
--parallel 2 --output-junit webkitgtk-results.xml
if [[ "$measure_only" != true ]]; then
cmake --build build-jetson-webkitgtk --target webtest developer_integration webfront-wf --parallel 2
ctest --test-dir build-jetson-webkitgtk -L web-integration --output-on-failure --no-tests=error \
--parallel 2 --output-junit webkitgtk-results.xml
fi
# The image stream measurement (docs/IMAGE_STREAMS.md), on a maintainer's dispatch only: figures in the log, no threshold.
if [[ "${GITHUB_EVENT_NAME:-}" == workflow_dispatch || "$measure_only" == true ]]; then
cmake --build build-jetson-webkitgtk --target image_stream_bench --parallel 2
xvfb-run -a build-jetson-webkitgtk/test/web/image_stream_bench "$PWD/test/web/image-stream" \
build-jetson-webkitgtk/image-streams-results.json
# A new directory each time, removed however the script ends. The trap is set only once mktemp has named it.
frames=$(mktemp -d "$PWD/build-jetson-webkitgtk/image-stream-frames.XXXXXX")
trap 'rm -rf -- "${frames:?}"' EXIT
test/web/image-stream/host-encoders.sh build-jetson-webkitgtk/test/web/image_stream_bench "$frames"
Comment thread
ambroise-leclerc marked this conversation as resolved.
Resolved
fi
ccache --show-stats
57 changes: 56 additions & 1 deletion .github/workflows/BuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ on:
description: 'Also run the WebKitGTK aarch64 browser integration (GCC 13)'
type: boolean
default: false
jetson_orin_measure_only:
description: 'With jetson_orin: build and run only the image stream measurement, not the test suites'
type: boolean
default: false
image_streams:
description: 'Record the image stream measurement (docs/IMAGE_STREAMS.md) on WebView2 and WKWebView'
type: boolean
default: false
repeat_desktop_tests:
description: 'Also run the desktop matrix, repeating the complete CTest suite desktop_passes times'
type: boolean
Expand Down Expand Up @@ -54,7 +62,7 @@ jobs:
# Pre-merge entry point: the standalone workflow cannot be dispatched until it is on the default branch.
jetson-validation:
if: >-
github.repository == 'ambroise-leclerc/WebFront' && !cancelled() && github.event_name == 'workflow_dispatch' &&
github.repository == 'BareNative/WebFront' && !cancelled() && github.event_name == 'workflow_dispatch' &&
github.actor == 'ambroise-leclerc' && github.ref_type == 'branch' && inputs.jetson_orin
runs-on: [self-hosted, linux, arm64, jetson-orin]
timeout-minutes: 180
Expand All @@ -66,6 +74,8 @@ jobs:
with:
persist-credentials: false
- name: Build and test at low priority
env:
WEBFRONT_JETSON_MEASURE_ONLY: ${{ inputs.jetson_orin_measure_only }}
run: nice -n 15 ionice -c 3 bash .github/scripts/jetson-orin.sh
- name: Retain diagnostics
if: always()
Expand Down Expand Up @@ -354,6 +364,51 @@ jobs:
build/diagnostics/
if-no-files-found: ignore

# The image stream measurement of the engines no maintainer machine has (#769, docs/IMAGE_STREAMS.md): on dispatch only,
# never on a push or a pull request, and no check of its figures.
image-stream-measurement:
if: github.event_name == 'workflow_dispatch' && inputs.image_streams
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
platform: [windows-msvc-webview2, macos-clang-wkwebview]
include:
- platform: windows-msvc-webview2
os: windows-2025
options: -DWEBFRONT_EMBED_WEBVIEW2=ON -DWEBFRONT_WEBTEST_FRONTEND=WebView2
- platform: macos-clang-wkwebview
os: macos-26
options: -DWEBFRONT_EMBED_WKWEBVIEW=ON -DWEBFRONT_WEBTEST_FRONTEND=WKWebView
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/remove-node
- uses: ./.github/actions/setup-cmake
with:
version: '4.4.4'
- name: Initialize MSVC environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1
- name: Setup Xcode
if: runner.os == 'macOS'
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
with:
xcode-version: latest
- name: Configure
run: >-
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_ENABLE_TESTING=ON
-DWEBFRONT_BUILD_EXAMPLES=OFF -DWARNINGS_AS_ERRORS=OFF -DENABLE_CACHE=OFF -DCMAKE_CXX_SCAN_FOR_MODULES=OFF
${{ matrix.options }}
- name: Measure
run: cmake --build build --target image_stream_report --parallel 4
- name: Retain the report
uses: actions/upload-artifact@v4
with:
name: image-streams-${{ matrix.platform }}
path: build/image-streams.json
if-no-files-found: error

desktop-native:
if: github.event_name != 'workflow_dispatch' || inputs.repeat_desktop_tests
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/JetsonOrin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
jetson-orin:
if: >-
github.repository == 'ambroise-leclerc/WebFront' && !cancelled() &&
github.repository == 'BareNative/WebFront' && !cancelled() &&
(github.event_name == 'schedule' || (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch' && github.actor == 'ambroise-leclerc' && github.ref_type == 'branch'))
runs-on: [self-hosted, linux, arm64, jetson-orin]
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The README introduces WebFront through the Game of Life walkthrough, demonstrati
- `include/webfront/system/`: layered virtual filesystems and the embedded web resources, a closed list guarded by the `MinimalCoreAssets` CTest case (normative list and 150 KiB decoded budget in ADR-016; changing it means amending the ADR and `test/cmake/CheckMinimalCoreAssets.cmake` together).
- `include/webfront/frontend/`: system-browser, CEF, optional Windows WebView2 and macOS WKWebView frontend adapters.
- `docs/DISTRIBUTION.md`: `find_package(WebFront)` (`cmake/WebFrontInstall.cmake`, pins in `cmake/WebFrontDependencies.cmake`), the vcpkg port and Conan recipe in `cmake/packaging/`, `webfront_package()`, the SBOM and the optional updater `include/webfront/components/update/` (ADR-028; never write cryptography there).
- `examples/`: the default build includes Hello World (`hello-world/`), the host loop (`host-loop/`: an application that keeps its own loop, `app.start()` or a host thread beside a native window; it ray-traces a Boing Ball on the CPU or with an optional CUDA unit, see `docs/HOST_LOOP_EXAMPLE.md`) and Game of Life (`life/`, with console, developer and embedded stages, plus the `life/react/` variant with a C++ panel inside React). The standalone [PTY example](docs/PTY.md) has its own CMake entry point.
- `examples/`: the default build includes Hello World (`hello-world/`), the host loop (`host-loop/`: an application that keeps its own loop, `app.start()` or a host thread beside a native window; it ray-traces a Boing Ball on the CPU or with an optional CUDA unit, see `docs/HOST_LOOP_EXAMPLE.md`), the image stream (`image-stream/`: images of the host in the page, JPEG frames or typed-array pixels, `docs/IMAGE_STREAMS.md`) and Game of Life (`life/`, with console, developer and embedded stages, plus the `life/react/` variant with a C++ panel inside React). The standalone [PTY example](docs/PTY.md) has its own CMake entry point.
- `js/core/`: readable browser bridge, fallback and bootstrap loader compiled into `include/webfront/`, plus the embedding CMake modules; `js/developer/`: developer environment (its terminal and `wf`), the wf scripts that build it (`scripts/`), build and publication tools. The repository is itself a `wf` project (`js/developer/webfront.project.json` and its lock, selected with `--manifest-dir js/developer`): the environment builds itself, and its pure JavaScript specs (`test/developer/`) run with `wf test`. Production C++ remains header-only in `include/webfront/`.
- `js/developer/starters/`: the sources of the `app` and `store` starters (`store` receives copies of `js/store/` when the environment is built) and `agent-guide.md`, the `AGENTS.md` that `wf create` puts beside a starter and that `webfront_write_agent_guide()` (`cmake/WebFrontAgentGuide.cmake`) writes in a consuming project.
- `js/services/`: optional `@webfront/services` package, the browser side of the system services (ADR-020; the window service so far, its C++ side in `include/webfront/services/window/`), built like `@webfront/react` by `wf run services-package`; outside the core's embedded resource list.
Expand Down
35 changes: 35 additions & 0 deletions cmake/ImageStreamBenchmark.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Manual measurement of image streams (#769, docs/IMAGE_STREAMS.md): never built by default, never a CTest case.
# cmake --build <build> --target image_stream_report
# builds image_stream_bench for the browser test frontend, runs it and writes <build>/image-streams.json. A display is
# needed (run it under xvfb-run without one).
function(webfront_add_image_stream_benchmark source)
webfront_add_test_program(image_stream_bench ImageStreamBenchmark.cpp EXCLUDE_FROM_ALL)
include(ImageStreamJpeg)
webfront_link_image_stream_jpeg(image_stream_bench WEBFRONT_BENCH_JPEG)
if(WEBFRONT_WEBTEST_FRONTEND STREQUAL "WebKitGTK")
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(WEBFRONT_WEB_EXTENSION QUIET IMPORTED_TARGET webkitgtk-web-process-extension-6.0)
endif()
if(WEBFRONT_WEB_EXTENSION_FOUND)
set(directory "${CMAKE_CURRENT_BINARY_DIR}/image-stream-extension")
add_library(image_stream_extension MODULE EXCLUDE_FROM_ALL "${source}/ImageStreamWebExtension.cpp")
target_link_libraries(image_stream_extension PRIVATE PkgConfig::WEBFRONT_WEB_EXTENSION ${CMAKE_DL_LIBS} rt)
set_target_properties(image_stream_extension PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${directory}")
add_dependencies(image_stream_bench image_stream_extension)
target_compile_definitions(image_stream_bench PRIVATE WEBFRONT_BENCH_SHM
"WEBFRONT_BENCH_EXTENSION_DIRECTORY=\"${directory}\"")
target_link_libraries(image_stream_bench PRIVATE rt)
else()
message(STATUS "image_stream_bench: no WebKitGTK web process extension headers, no shared memory track")
endif()
endif()
if(WEBFRONT_WEBTEST_FRONTEND STREQUAL "WKWebView")
set_target_properties(image_stream_bench PROPERTIES MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_GUI_IDENTIFIER "org.webfront.tests.image-stream-bench"
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/test/cmake/WKWebViewTestInfo.plist.in")
endif()
add_custom_target(image_stream_report
COMMAND image_stream_bench "${source}/image-stream" "${CMAKE_BINARY_DIR}/image-streams.json"
USES_TERMINAL VERBATIM)
endfunction()
25 changes: 25 additions & 0 deletions cmake/ImageStreamJpeg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# The optional JPEG library of the image stream example and of its measurement and test (docs/IMAGE_STREAMS.md). Searched
# by default on Linux only: elsewhere a runner or a developer machine often holds a libjpeg of another toolchain (Strawberry
# Perl, Mono) that find_package would pick. Without it the host sends pixels, and the benchmark lets the page encode.
include_guard(GLOBAL)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(_webfront_image_jpeg_default ON)
else()
set(_webfront_image_jpeg_default OFF)
endif()
option(WEBFRONT_IMAGE_STREAM_JPEG "Encode the images of the image stream example with libjpeg" ${_webfront_image_jpeg_default})

# webfront_link_image_stream_jpeg(<target> <definition>): links libjpeg and defines <definition> when it is found.
function(webfront_link_image_stream_jpeg target definition)
if(NOT WEBFRONT_IMAGE_STREAM_JPEG)
return()
endif()
find_package(JPEG QUIET)
if(JPEG_FOUND)
target_link_libraries(${target} PRIVATE JPEG::JPEG)
target_compile_definitions(${target} PRIVATE ${definition})
else()
message(STATUS "${target}: no JPEG library found, built without JPEG encoding")
endif()
endfunction()
3 changes: 2 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ these entries stays in the GitHub releases and the Git history.
- Build an installer of your application with `webfront_package()`: Debian package with the WebKitGTK profile, macOS disk image or NSIS installer that detects the WebView2 runtime (#762, ADR-028, `docs/DISTRIBUTION.md`).
- Replace an executable with a signed one, with rollback, using the optional `webfront/components/update/Updater.hpp` (#762, ADR-028, `docs/DISTRIBUTION.md`).
- Write the SPDX bill of materials of your application with `webfront_write_sbom()`, with declared licenses, web engines and system libraries (#762, ADR-028, `docs/DISTRIBUTION.md`).
- First measurements of image streams to the page: raw frames, JPEG and WebCodecs availability under CEF and WebKitGTK (#769, `docs/IMAGE_STREAMS.md`).
- Show images of the host in the page with the `examples/image-stream/` example: JPEG frames skipped when the page lags, typed-array pixels as fallback (#769, `docs/IMAGE_STREAMS.md`).
- Compare the ways to send images to the page with the manual `image_stream_report` target: bridge, streamed route, shared memory prototype, WebCodecs and host encoders (#769, `docs/IMAGE_STREAMS.md`).
- Open an embedded window maximized, full screen, without a frame or with a minimum size (`WindowOptions`), on WebKitGTK and CEF (#764, `docs/FRONTENDS.md`).
- `wf dev` applies a change of the stylesheet alone without reloading the page, once an environment with it is published (#763, ADR-014).
- `wf dev` replaces modules in place, keeping the page's state and its connection: React Fast Refresh and `import.meta.hot`, with a full reload when neither applies; the Life React component moved to `Life.tsx`. In the sources of environment 1.3.2, not yet published (#763, ADR-014, `docs/DEVELOPER_ENVIRONMENT.md`).
Expand Down
Loading
Loading