Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ include/webfront/system/*Data.hpp text eol=lf
js/developer/environment/* text eol=lf

# Starter archives and every hashed distribution input must be identical on Windows.
LICENSE text eol=lf
examples/life/ui/* text eol=lf
js/developer/tools/* text eol=lf

Expand Down
8 changes: 8 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Contributing Guidelines

## License of contributions

Unless explicitly agreed otherwise, contributions submitted for inclusion in
WebFront must be available under **Apache-2.0 OR CECILL-B**, at the recipient's
option, as described in [LICENSE](../LICENSE). Submit only work you have the
right to license on these terms, and retain existing third-party license and
copyright notices.

## Coding Style

We follow the **C++ Core Guidelines** to ensure conformance with modern C++23 generic programming. Please refer to the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) for detailed rules. Key points are summarized below:
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/wf-driver/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ runs:
- name: Install GCC 16 and WebKitGTK
shell: bash
run: |
# The hosted runner's Azure mirror can trickle large GCC packages until the job times out.
# Keep Ubuntu's suites and package verification, using its primary archive instead.
if [ -f /etc/apt/apt-mirrors.txt ]; then
sudo sed -i 's|azure\.archive\.ubuntu\.com|archive.ubuntu.com|g' /etc/apt/apt-mirrors.txt
fi
sudo apt-get update
sudo apt-get install -y --no-install-recommends -o Acquire::Retries=3 gcc-16 g++-16 libwebkitgtk-6.0-dev
echo "CC=gcc-16" >> "$GITHUB_ENV"
Expand Down
1,276 changes: 1,276 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,16 @@ CI runs one combined C++ / native-browser job per desktop platform on each code
- Development project access is explicit and intended for trusted local code. Downloaded tools run with the application's bridge authority, and script permissions frame only the `context` API: neither is a sandbox. Only packages that run in a browser are supported; installation scripts and native add-ons are not executed. Builds transform TypeScript without type checking; `wf check` type-checks with the compiler the project locks.
- Packaging, accessibility and native-engine deployment still need application-specific work. General DOM abstractions remain future work. See [project status](docs/PROJECT_STATUS.md) for known limitations.

## License

WebFront is dual-licensed under **Apache-2.0 OR CECILL-B**, at your option.
You may use, modify and redistribute WebFront under either license; you do not
need to comply with both simultaneously. See [LICENSE](LICENSE) for the full
Apache 2.0 and CeCILL-B version 1 texts, including the French and English
versions of CeCILL-B.

Third-party components retain their own licenses and notices. The WebFront
license choice does not replace the licenses of its dependencies or bundled
third-party code.

[Developer environment reference](docs/DEVELOPER_ENVIRONMENT.md) · [architecture decisions](docs/adr/README.md) · [contributing](.github/CONTRIBUTING.md)
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

- License WebFront under Apache-2.0 OR CECILL-B, at the recipient's option.
Include both full license texts (CeCILL-B in French and English), document
contribution terms and carry the license into newly built developer and
Life starter archives. Third-party components retain their own licenses.

- DOM batch protocol (#380): bounded command 5, canonical uint32 LEB128 and UTF-8 codec,
interned names and correlated rejection callbacks. The optional embedded `webfront-dom.mjs`
validates the evolving tree before applying mutations, protects page-owned islands, and
Expand Down
1 change: 1 addition & 0 deletions include/webfront/WebFront.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0 OR CECILL-B
/// @date 18/01/2022 19:34:27
/// @author Ambroise Leclerc
/// @brief WebFront UI main objet
Expand Down
5 changes: 3 additions & 2 deletions js/developer/environment/bundles.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"LICENSE": "0b96b3ed27eb64ba777eaa049093d0047c7f9a4e690b6e68b52fde2844226ccd",
"js/developer/environment/manifest.mjs": "8a655810fd7bd380d861adad9a7870bb677fd530483cf9113ca240e03facdce5",
"js/developer/environment/project.mjs": "280cced29e41bc48d5d9d69934186ababfdbbc9dc32ed9517e17af4f19d3bd73",
"js/developer/environment/installer.mjs": "1159404b151dc8c580d9a155a9ec0dfa3fcb6a8e073d8586d29b329ce91b741b",
Expand Down Expand Up @@ -40,8 +41,8 @@
"js/developer/tools/distribution.json": "7029cf3e2e64e5ea44b595fddcc0151fca4cc210d2ef1258cee7bb8d75e7cd2f",
"js/developer/tools/archive.mjs": "bfe9feeb5e4d4e1b7c44c4dec4dcbeab4ae59c2bf16a1d2b32cd6910a2b84e7b",
"js/developer/tools/distribution.mjs": "1108b61bc659dd945ba1417aa84337bca03039842d342c95815b5463d87a136e",
"js/developer/scripts/build.mjs": "df91efbc9bb19559c36440f0be7ec2b2af406209146a0d8eb88d688803a74c68",
"js/developer/webfront.project.json": "691836184ab09fddf7248920473a0b89402dea1807747deb018c4597049455a8",
"js/developer/scripts/build.mjs": "7aa0358dbd8555ab83bf0380f67892e96b7e9806d4968de18e1a8eaf6e91c080",
"js/developer/webfront.project.json": "f5cff35f304e319f23f2bb1666eab1c6521e5da6d61c9531504df46e4001febf",
"js/core/bootstrap/bootstrap.bundle.mjs": "536831257f0fc92e31911841750e1e59247f7c64e756b0fcb878efd9860a741f",
"js/developer/environment/packages.bundle.mjs": "413e1dbf24d3993894d6bcbd9c01bd456e446170931f8daacfd06ce537cb2abc",
"include/webfront/system/DeveloperReleaseData.hpp": "567a88fed2839a23c2abad2dd9c2b74afe9934b1e1bdf44ec1099d9332b35c90"
Expand Down
7 changes: 5 additions & 2 deletions js/developer/scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,24 @@ export default async function (context) {
['xterm Fit addon', lockedFile(lock, '@xterm/addon-fit', 'LICENSE')],
['fflate', lockedFile(lock, 'fflate', 'LICENSE')],
];
const notices = [];
const webfrontLicense = await project.readText('LICENSE');
const notices = [webfrontLicense];
for (const [name, path] of licenses) notices.push(`${name}\n${await project.readText(path)}`);
files.set('LICENSES.txt', await write(`${output}/LICENSES.txt`, notices.join('\n\n')));

// The starter is pinned by the environment's own trusted archive, not by unverified remote metadata.
const starters = {};
for (const [name, provider] of [['life', 'LifeUI']]) {
const starterFiles = new Map();
starterFiles.set('package/LICENSE', encoder.encode(webfrontLicense));
for (const file of ['main.tsx', 'style.css'])
starterFiles.set(`package/${file}`, await project.read(`examples/life/ui/${file}`));
const recipe = {format: 1, name: `${name}-starter`, version, dependencies: {
react: dependencies.react, 'react-dom': dependencies['react-dom']},
entries: {main: 'main.tsx'}, providers: {[provider]: {entry: 'main', output: `generated/${provider}.hpp`}}};
starterFiles.set('package/webfront.project.json', encoder.encode(JSON.stringify(recipe, null, 2) + '\n'));
starterFiles.set('package/package.json', encoder.encode(JSON.stringify({name: `@webfront/${name}-starter`, version,
private: true, webfront: {kind: 'starter', entry: 'main.tsx'}}, null, 2) + '\n'));
private: true, license: '(Apache-2.0 OR CECILL-B)', webfront: {kind: 'starter', entry: 'main.tsx'}}, null, 2) + '\n'));
const starterBytes = compress(tar(starterFiles));
const archive = `${name}-starter.tgz`;
await write(`${output}/${archive}`, starterBytes);
Expand All @@ -94,6 +96,7 @@ export default async function (context) {
compiler: `esbuild-wasm@${dependencies['esbuild-wasm']}`, semver: dependencies.semver, starters}, null, 2) + '\n'));
files.set('package.json', await write(`${output}/package.json`, JSON.stringify({name: '@webfront/developer-environment', version,
description: 'Browser-powered WebFront developer environment', type: 'module',
license: '(Apache-2.0 OR CECILL-B)',
files: ['runtime.mjs', 'compiler.mjs', 'script-worker.mjs', 'typecheck-worker.mjs', 'esbuild.wasm', 'xterm.css', 'environment.json', 'LICENSES.txt']}, null, 2) + '\n'));

const bytes = compress(tar(new Map([...files].map(([name, content]) => [`package/${name}`, content]))));
Expand Down
1 change: 1 addition & 0 deletions js/developer/tools/bundle-inputs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"LICENSE",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
"js/developer/environment/manifest.mjs",
"js/developer/environment/project.mjs",
"js/developer/environment/installer.mjs",
Expand Down
1 change: 1 addition & 0 deletions js/developer/webfront.project.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"permissions": {
"files": [
"LICENSE",
"js/developer/webfront.project.json",
"js/developer/webfront-packages.lock.json",
".webfront/developer/packages",
Expand Down
6 changes: 5 additions & 1 deletion test/cmake/CheckRepositoryLayout.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endif()

set(expected
.gitattributes .github .gitignore
AGENTS.md CMakeLists.txt README.md
AGENTS.md CMakeLists.txt LICENSE README.md
cmake docs examples include js test)

set(actual "")
Expand Down Expand Up @@ -52,6 +52,10 @@ if(NOT from_git)
endif()
endforeach()
endif()
# Include the license during local validation before it has been added to Git.
if(EXISTS "${ROOT}/LICENSE")
list(APPEND actual LICENSE)
endif()
# .gitattributes and .gitignore are export-ignored, so archives legitimately lack them.
set(archive_optional .gitattributes .gitignore)
list(REMOVE_ITEM actual "" ${archive_optional})
Expand Down
1 change: 1 addition & 0 deletions test/cmake/CheckRepositoryLayoutNegative.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ foreach(entry .gitattributes .github .gitignore AGENTS.md CMakeLists.txt README.
cmake docs examples js test)
file(WRITE "${WORK_DIR}/${entry}/placeholder" "")
endforeach()
file(WRITE "${WORK_DIR}/LICENSE" "Apache-2.0 OR CECILL-B\n")
file(WRITE "${WORK_DIR}/include/webfront/WebFront.hpp" "")

function(git)
Expand Down
1 change: 1 addition & 0 deletions test/cmake/PrepareSelfBuildProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Usage: cmake -DSOURCE=<checkout> -DPROJECT=<directory to create> [-DARCHIVES=<directory>] -P PrepareSelfBuildProject.cmake
file(REMOVE_RECURSE "${PROJECT}")
file(MAKE_DIRECTORY "${PROJECT}" "${PROJECT}/include/webfront/system" "${PROJECT}/js/developer")
file(COPY "${SOURCE}/LICENSE" DESTINATION "${PROJECT}")
file(COPY "${SOURCE}/js/core" DESTINATION "${PROJECT}/js")
file(COPY "${SOURCE}/js/developer/webfront.project.json" DESTINATION "${PROJECT}/js/developer")
foreach(directory environment scripts tools)
Expand Down
Loading