Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cca3df0
Add browser-powered PI development and offline embedding demo [#288]
ambroise-leclerc Oct 20, 2026
a6f625c
Provision versioned GitHub developer packages and PI starter [#288]
ambroise-leclerc Oct 20, 2026
6a9a3b8
Record public developer demo validation and isolate package releases …
ambroise-leclerc Oct 20, 2026
9380bf3
Avoid constructor member shadowing in developer app headers [#288]
ambroise-leclerc Oct 20, 2026
a52c3fd
Read developer test fixtures with bounded checked I/O [#288]
ambroise-leclerc Oct 20, 2026
297947a
Add spatial Game of Life starter and native browser-build demo [#288]
ambroise-leclerc Oct 20, 2026
356a8da
Record public Life demo and Linux browser validation [#288]
ambroise-leclerc Oct 20, 2026
51eb04f
backup
ambroise-leclerc Oct 20, 2026
b6bae2e
Align packed-bitset demo with merged bridge support and simplify cell…
ambroise-leclerc Oct 20, 2026
7a943c7
Record verified packed-bitset demo and public 0.3.0 distribution [#289]
ambroise-leclerc Oct 20, 2026
9bbccd6
Merge develop and preserve native developer test integration [#288]
ambroise-leclerc Oct 20, 2026
3c1c618
Expire abandoned developer transactions, honor the installed lock and…
ambroise-leclerc Oct 20, 2026
72e5519
Remove an unused import from the distribution check [#288]
ambroise-leclerc Oct 20, 2026
86b4d25
Split the developer environment's complex functions for the CodeScene…
ambroise-leclerc Oct 20, 2026
3982b0a
Refuse bridge connections without an Origin, check Pages before publi…
ambroise-leclerc Oct 20, 2026
933509b
Split the store helpers, import resolution and Life starter types fur…
ambroise-leclerc Oct 20, 2026
20aa8bc
Keep staging cleanup inside the project, fix wf list and split the lo…
ambroise-leclerc Oct 20, 2026
5c99800
Split bootstrap I/O, registry access, starter recipes and store paths…
ambroise-leclerc Oct 20, 2026
a5fbee4
Flatten the lock, registry, bootstrap and store helpers further [#288]
ambroise-leclerc Oct 21, 2026
59295a0
Move lock validation and archive reading into their own modules [#288]
ambroise-leclerc Oct 21, 2026
f7c73dd
Move version pinning and peer resolution out of the package resolver …
ambroise-leclerc Oct 21, 2026
fc623c9
Fall through unresolved export conditions and refuse staged paths tha…
ambroise-leclerc Oct 21, 2026
ec4c907
Move export conditions out of the entry resolver [#288]
ambroise-leclerc Oct 21, 2026
1a2d6a5
Simplify package entry resolution [#288]
ambroise-leclerc Oct 21, 2026
4c6ef41
Cover developer store errors and application bootstrap; exclude examp…
ambroise-leclerc Oct 21, 2026
058dd13
Split large assertion blocks in developer tests [#288]
ambroise-leclerc Oct 21, 2026
921e46e
Bind developer bridge callbacks to store methods [#288]
ambroise-leclerc Oct 21, 2026
5f91f6d
Revert "Bind developer bridge callbacks to store methods [#288]"
ambroise-leclerc Oct 21, 2026
20bbeea
Register developer bridge callbacks through one shared template [#288]
ambroise-leclerc Oct 21, 2026
5047784
Exempt the bridge-facing developer store from Primitive Obsession [#288]
ambroise-leclerc Oct 21, 2026
7f6d75c
Set the Codecov patch target to 95% [#288]
ambroise-leclerc Oct 21, 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
28 changes: 28 additions & 0 deletions .codescene/code-health-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,34 @@
"rules": [
{ "name": "String Heavy Function Arguments", "weight": 0.0 }
]
},
{
"matching_content_path": "src/developer/*.bundle.mjs",
"matching_content_path_doc": "Minified esbuild output of the sources next to it, checked in so that the bootstrap and package resolver need no Node.js at consumption time. It is regenerated by tools/developer/build.mjs --refresh-bootstrap and verified against src/developer/bundles.json, never edited by hand; the readable sources are analysed instead.",
"rules": [
{ "name": "Complex Method", "weight": 0.0 },
{ "name": "Bumpy Road Ahead", "weight": 0.0 },
{ "name": "Complex Conditional", "weight": 0.0 },
{ "name": "Excess Number of Function Arguments", "weight": 0.0 },
{ "name": "Deep, Nested Complexity", "weight": 0.0 },
{ "name": "Large Method", "weight": 0.0 },
{ "name": "Brain Method", "weight": 0.0 },
{ "name": "Overall Code Complexity", "weight": 0.0 },
{ "name": "Lines of Code in a Single File", "weight": 0.0 },
{ "name": "Number of Functions in a Single Module", "weight": 0.0 },
{ "name": "Code Duplication", "weight": 0.0 },
{ "name": "Primitive Obsession", "weight": 0.0 },
{ "name": "String Heavy Function Arguments", "weight": 0.0 },
{ "name": "Low Cohesion", "weight": 0.0 }
]
},
{
"matching_content_path": "include/system/DeveloperStore.hpp",
"matching_content_path_doc": "The store implements the webfront.developer.* bridge callbacks, whose identifiers, project paths, offsets and flags arrive as primitives from the browser. Wrapping them in types only to lower the ratio would obscure the bridge contract.",
"rules": [
{ "name": "String Heavy Function Arguments", "weight": 0.0 },
{ "name": "Primitive Obsession", "weight": 0.0 }
]
}
]
}
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,12 @@ third_party/jasmine/* text eol=lf
third_party/jasmine/*.png binary
third_party/fflate/* text eol=lf
include/system/*Data.hpp text eol=lf

# Browser-powered developer bootstrap sources and generated payloads.
src/developer/* text eol=lf
tools/assets/package-lock.json text eol=lf

# Starter archives and every hashed distribution input must be identical on Windows.
src/pi/* text eol=lf
src/life/* text eol=lf
tools/developer/* text eol=lf
15 changes: 13 additions & 2 deletions .github/workflows/BuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,18 @@ jobs:
run: |
launchctl print gui/$(id -u) >/dev/null
pgrep -x WindowServer
- name: Prepare offline developer environment and starter fixtures
run: |
npm ci --prefix tools/assets --ignore-scripts
node tools/developer/build.mjs build-developer-environment
node tools/developer/fixtures.mjs build-developer-environment
- name: Configure system WebKit frontend
run: >-
cmake -S . -B build-wkwebview -DCMAKE_BUILD_TYPE=Release
-DWEBFRONT_EMBED_CEF=OFF -DENABLE_TESTING=ON
-DWEBFRONT_EMBED_WKWEBVIEW=ON -DWEBFRONT_WEBTEST_FRONTEND=WKWebView
-DWEBFRONT_DEMO_FRONTEND=Native
-DWEBFRONT_DEVELOPER_FIXTURES=${{github.workspace}}/build-developer-environment
- name: Build
run: cmake --build build-wkwebview --parallel 2
- name: Test
Expand Down Expand Up @@ -362,11 +368,16 @@ jobs:
sudo apt-get update
sudo apt-get install -y xvfb

- name: Prepare offline developer environment and starter fixtures
run: |
npm ci --prefix tools/assets --ignore-scripts
node tools/developer/build.mjs build-developer-environment
node tools/developer/fixtures.mjs build-developer-environment
- name: Configure CEF integration build
run: cmake . -B ${{github.workspace}}/build-cef -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=ON -DENABLE_TESTING=ON
run: cmake . -B ${{github.workspace}}/build-cef -DCMAKE_BUILD_TYPE=Release -DWEBFRONT_EMBED_CEF=ON -DENABLE_TESTING=ON -DWEBFRONT_DEVELOPER_FIXTURES=${{github.workspace}}/build-developer-environment

- name: Build browser test
run: cmake --build ${{github.workspace}}/build-cef --target webtest --parallel 1
run: cmake --build ${{github.workspace}}/build-cef --target webtest developer_integration --parallel 1

- name: Run Jasmine bridge test
run: ctest --test-dir ${{github.workspace}}/build-cef -L web-integration --output-on-failure --no-tests=error
Expand Down
126 changes: 126 additions & 0 deletions .github/workflows/DeveloperDistribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Developer packages

on:
push:
tags: ['developer-v*']
branches: ['**']
paths:
- 'src/developer/**'
- 'src/pi/**'
- 'src/life/**'
- 'tools/developer/**'
- 'tools/assets/package*.json'
- 'include/system/DeveloperReleaseData.hpp'
- '.github/workflows/DeveloperDistribution.yml'
pull_request:
branches: [develop, master]
paths:
- 'src/developer/**'
- 'src/pi/**'
- 'src/life/**'
- 'tools/developer/**'
- 'tools/assets/package*.json'
- 'include/system/DeveloperReleaseData.hpp'
- '.github/workflows/DeveloperDistribution.yml'
workflow_dispatch:
inputs:
publish:
description: Publish the pinned version to GitHub Pages
type: boolean
default: false

permissions:
contents: read

jobs:
package:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: tools/assets/package-lock.json
- name: Install pinned maintenance dependencies
run: npm ci --prefix tools/assets --ignore-scripts
- name: Build and verify the environment and starter packages
run: |
node tools/developer/build.mjs build-distribution
node tools/developer/build.mjs build-distribution-repeat
cmp build-distribution/environment.tgz build-distribution-repeat/environment.tgz
cmp build-distribution/pi-starter.tgz build-distribution-repeat/pi-starter.tgz
cmp build-distribution/life-starter.tgz build-distribution-repeat/life-starter.tgz
cmp include/system/DeveloperReleaseData.hpp build-distribution/DeveloperReleaseData.hpp
node --test tools/developer/check.mjs tools/developer/distribution-check.mjs
- name: Check the dedicated release tag
if: startsWith(github.ref, 'refs/tags/developer-v')
env:
RELEASE_TAG: ${{ github.ref_name }}
run: node tools/developer/release-check.mjs "$RELEASE_TAG"
- uses: actions/upload-artifact@v4
with:
name: developer-distribution
if-no-files-found: error
path: |
build-distribution/environment.tgz
build-distribution/pi-starter.tgz
build-distribution/life-starter.tgz
build-distribution/provision.json
build-distribution/DeveloperReleaseData.hpp

publish:
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/developer-v') || (github.event_name == 'workflow_dispatch' && inputs.publish))
needs: package
runs-on: ubuntu-24.04
permissions:
contents: write
pages: write
concurrency:
group: developer-pages-publication
cancel-in-progress: false
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
- uses: actions/download-artifact@v4
with:
name: developer-distribution
path: build-distribution
- name: Check the configured Pages source before pushing
run: node tools/developer/pages.mjs --check
- name: Preserve existing versions and publish the static branch
shell: bash
run: |
set -euo pipefail
gh auth setup-git
site="$RUNNER_TEMP/developer-pages"
git init --initial-branch=gh-pages "$site"
git -C "$site" remote add origin "https://github.com/$GITHUB_REPOSITORY.git"
result=0
git -C "$site" ls-remote --exit-code --heads origin gh-pages > "$RUNNER_TEMP/developer-pages-ref" || result=$?
if [ "$result" = 0 ]; then
git -C "$site" fetch --depth=1 origin gh-pages
git -C "$site" switch --detach FETCH_HEAD
elif [ "$result" != 2 ]; then
exit "$result"
fi
node tools/developer/site.mjs build-distribution "$site"
git -C "$site" config user.name "$GITHUB_ACTOR"
git -C "$site" config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git -C "$site" add .nojekyll index.html developer
if ! git -C "$site" diff --cached --quiet; then
version=$(node -p "require('./tools/developer/distribution.json').version")
git -C "$site" commit -m "Publish developer packages $version [#288]"
git -C "$site" push origin HEAD:refs/heads/gh-pages
fi
- name: Request the configured Pages build
run: node tools/developer/pages.mjs
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
- name: Archive tagged packages in a dedicated prerelease
if: startsWith(github.ref, 'refs/tags/developer-v')
env:
RELEASE_TAG: ${{ github.ref_name }}
run: node tools/developer/archive-release.mjs "$RELEASE_TAG" build-distribution
2 changes: 2 additions & 0 deletions .github/workflows/ReleaseVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ permissions:

jobs:
version:
# Developer package prereleases use their own version and validation workflow.
if: github.event_name != 'release' || !startsWith(github.event.release.tag_name, 'developer-v')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ Your system browser opens the interface below. The page is included in the libra

![The embedded Hello, WebFront! page showing the connected indicator](docs/images/hello-world.png)

## Browser-powered development (experimental)

The optional [developer environment](docs/DEVELOPER_ENVIRONMENT.md) downloads its terminal and
JavaScript/WASM build tools on demand. Install browser libraries with `wf install`, preview local
TSX, then generate compressed C++ resource headers with `wf embed`. The Game of Life example pairs a small C++23 bitset simulation with a spatial React interface,
then demonstrates
recompiling an offline native application without installing Node.js or npm on the developer's machine.
The [version-pinned environment and starters](https://ambroise-leclerc.github.io/WebFront/)
are hosted on GitHub Pages; see the guide for the complete walkthrough.

## Connect your interface to C++

For a small first example, the Greeter connects a name field and a button to application code. Register an ordinary C++ lambda; WebFront deduces its signature:
Expand Down
10 changes: 10 additions & 0 deletions cmake/WebFrontAssets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ function(webfront_add_embedded_assets)
"${root}/src/fallback/webfront-fallback.mjs" "${root}/include/system/FallbackModuleData.hpp"
FallbackModuleData FallbackModuleAssetFresh)

_webfront_add_embedded_text_asset(
"${root}/src/developer/index.html" "${root}/include/system/DeveloperIndexHtmlData.hpp"
DeveloperIndexHtmlData DeveloperIndexHtmlAssetFresh)
_webfront_add_embedded_text_asset(
"${root}/src/developer/bootstrap.bundle.mjs" "${root}/include/system/DeveloperBootstrapData.hpp"
DeveloperBootstrapData DeveloperBootstrapAssetFresh)

# Terminal component (include/system/TerminalFS.hpp). xterm.js files are vendored verbatim in
# third_party/xterm (see its VERSION file); refresh them with cmake/UpdateXterm.cmake.
_webfront_add_embedded_text_asset(
Expand Down Expand Up @@ -93,6 +100,9 @@ function(webfront_add_embedded_assets)
endforeach()
if(ENABLE_TESTING)
find_program(WEBFRONT_NODE_EXECUTABLE NAMES node nodejs REQUIRED)
add_test(NAME DeveloperJavaScript COMMAND "${WEBFRONT_NODE_EXECUTABLE}"
--test "${root}/tools/developer/check.mjs" "${root}/tools/developer/distribution-check.mjs")
set_tests_properties(DeveloperJavaScript PROPERTIES TIMEOUT 30)
add_test(NAME EmbeddedGzipContents COMMAND "${WEBFRONT_NODE_EXECUTABLE}"
"${root}/tools/assets/check.mjs")
endif()
Expand Down
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ coverage:
default:
target: auto
threshold: 0.2%
patch:
default:
target: 95%
ignore:
- "webtest/**"
- "src/**"
Loading
Loading