From 1a76de518a1f9c08bccfd606d8943f348c584957 Mon Sep 17 00:00:00 2001 From: gilad-ch <112815190+gilad-ch@users.noreply.github.com> Date: Sun, 26 Jul 2026 12:26:56 +0300 Subject: [PATCH 1/6] fix(v3/updater): type maxArchiveTotalSize as int64 to fix the 32-bit build (#5805) Fix 32-bit build: type maxArchiveTotalSize as int64 The updater's maxArchiveTotalSize constant is 2 GiB (2147483648). As an untyped constant it defaults to int when passed to fmt.Errorf, and on 32-bit targets (e.g. GOARCH=386) int is 32 bits, so the value overflows and the build fails: cannot use maxArchiveTotalSize (untyped int constant 2147483648) as int value in argument to fmt.Errorf (overflows) Type the constant int64 so it stays int64 at the format calls. Every other use is already int64 arithmetic, so behaviour is unchanged. Co-authored-by: Lea Anthony --- v3/UNRELEASED_CHANGELOG.md | 1 + v3/pkg/updater/extract.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/v3/UNRELEASED_CHANGELOG.md b/v3/UNRELEASED_CHANGELOG.md index 2ebe4eb0b50..28b8613673c 100644 --- a/v3/UNRELEASED_CHANGELOG.md +++ b/v3/UNRELEASED_CHANGELOG.md @@ -23,6 +23,7 @@ After processing, the content will be moved to the main changelog and this file ## Fixed +- Fix 32-bit build failure in the updater: the `maxArchiveTotalSize` constant (2 GiB) overflowed the platform `int` when passed to `fmt.Errorf` on `GOARCH=386`. It is now explicitly typed `int64`. ## Deprecated diff --git a/v3/pkg/updater/extract.go b/v3/pkg/updater/extract.go index 1b8f88ea0a3..1f598c5754d 100644 --- a/v3/pkg/updater/extract.go +++ b/v3/pkg/updater/extract.go @@ -17,8 +17,8 @@ import ( // caps give comfortable headroom while keeping malformed / hostile archives // from exhausting disk or file descriptors. const ( - maxArchiveEntries = 50_000 - maxArchiveTotalSize = 2 << 30 // 2 GiB total uncompressed + maxArchiveEntries = 50_000 + maxArchiveTotalSize int64 = 2 << 30 // 2 GiB total uncompressed ) // archiveKind is the set of archive formats the framework can unpack inline From ed3d71f78dead70c053f4eecd85b5b261239a369 Mon Sep 17 00:00:00 2001 From: taliesin-ai Date: Sun, 26 Jul 2026 19:27:02 +1000 Subject: [PATCH 2/6] docs: state the terms contributions are accepted under (#5816) CONTRIBUTING.md never said what licence contributions come in under, whether a CLA applies, or whether sign-off is required. That is a routine question for anyone contributing from inside a company, and the answer being implicit means each person has to ask or guess. States the existing position rather than introducing a new one: MIT in, MIT out, no CLA, no DCO trailer, and third-party code disclosed in the PR. Claude-Session: https://claude.ai/code/session_01FigQqUQbNu9ngE4a2CSNm8 Co-authored-by: taliesin-ai --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5f981743edd..5e9883ab891 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,3 +23,18 @@ Thanks for your interest in contributing! Wails has two active tracks. Pick the - Update the relevant changelog file (see above). - Follow the existing coding style in the area you're touching. - Add tests where it makes sense. + +## Licence and provenance + +Wails is released under the [MIT Licence](LICENSE), and contributions come in +under the same terms. By opening a pull request you confirm that: + +- You wrote the contribution yourself, or you have the right to submit it. +- You are licensing it to the project under the MIT Licence. +- Any third-party code included in it is compatibly licensed, and its origin + and licence are stated in the pull request. + +There is no CLA to sign and no sign-off trailer to add. If you are unsure +whether something you want to include is safe to contribute, ask in the pull +request before merging rather than after: sorting out the provenance of code +that has already shipped is considerably harder than sorting it out up front. From 521c68cd7240aa6726f051fee9ae82c7c4d5c926 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Jul 2026 09:27:44 +0000 Subject: [PATCH 3/6] =?UTF-8?q?chore(changelog):=20auto-add=20entry=20for?= =?UTF-8?q?=20PR=20#5816=20=E2=80=94=20docs:=20state=20the=20terms=20contr?= =?UTF-8?q?ibutions=20are=20accepted=20under?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v3/UNRELEASED_CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/v3/UNRELEASED_CHANGELOG.md b/v3/UNRELEASED_CHANGELOG.md index 28b8613673c..3f00b280299 100644 --- a/v3/UNRELEASED_CHANGELOG.md +++ b/v3/UNRELEASED_CHANGELOG.md @@ -17,6 +17,7 @@ After processing, the content will be moved to the main changelog and this file ## Added +- Add licence and provenance section to contributing guide in [PR](https://github.com/wailsapp/wails/pull/5816) by @taliesin-ai ## Changed From 08053497e23b22f46a474f76fd2aba14928268ee Mon Sep 17 00:00:00 2001 From: roach <30098945+roachadam@users.noreply.github.com> Date: Sun, 26 Jul 2026 04:42:53 -0500 Subject: [PATCH 4/6] fix(v3/windows): guard nil AllowDarkModeForWindow to avoid startup panic (#5793) fix(v3): guard nil AllowDarkModeForWindow to avoid startup panic on Windows 1809 pkg/w32/theme.go loads the undocumented dark-mode uxtheme exports (including AllowDarkModeForWindow) only on Windows build >= 18334, so on older builds such as Windows 10 1809 / Windows Server 2019 (build 17763) the package-level AllowDarkModeForWindow is nil. The Dark and system-dark branches of (*windowsWebviewWindow).run called it unguarded, so a window with Windows.Theme == Dark (or SystemDefault while the OS is in dark mode) panicked on startup with a nil pointer dereference before the window was shown. w32.SetMenuTheme already guards the identical call. Extract the call into an applyDarkMode method, which nil-guards it, and use it from both branches so the window degrades gracefully instead of crashing. Fixes #5792 Co-authored-by: Lea Anthony --- .../d2/docs/concepts/architecture-0.svg | 177 ++++++++++++++++ .../d2/docs/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/concepts/architecture-2.svg | 175 ++++++++++++++++ .../d2/docs/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/concepts/architecture-7.svg | 178 +++++++++++++++++ docs/public/d2/docs/concepts/bridge-0.svg | 189 ++++++++++++++++++ docs/public/d2/docs/concepts/bridge-1.svg | 188 +++++++++++++++++ docs/public/d2/docs/concepts/lifecycle-0.svg | 185 +++++++++++++++++ docs/public/d2/docs/concepts/lifecycle-1.svg | 184 +++++++++++++++++ .../docs/contributing/codebase-layout-0.svg | 184 +++++++++++++++++ .../d2/docs/de/concepts/architecture-0.svg | 186 +++++++++++++++++ .../d2/docs/de/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/de/concepts/architecture-2.svg | 178 +++++++++++++++++ .../d2/docs/de/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/de/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/de/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/de/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/de/concepts/architecture-7.svg | 178 +++++++++++++++++ docs/public/d2/docs/de/concepts/bridge-0.svg | 189 ++++++++++++++++++ docs/public/d2/docs/de/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/de/concepts/lifecycle-0.svg | 185 +++++++++++++++++ .../d2/docs/fr/concepts/architecture-0.svg | 186 +++++++++++++++++ .../d2/docs/fr/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/fr/concepts/architecture-2.svg | 178 +++++++++++++++++ .../d2/docs/fr/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/fr/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/fr/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/fr/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/fr/concepts/architecture-7.svg | 178 +++++++++++++++++ docs/public/d2/docs/fr/concepts/bridge-0.svg | 189 ++++++++++++++++++ docs/public/d2/docs/fr/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/fr/concepts/lifecycle-0.svg | 185 +++++++++++++++++ .../d2/docs/id/concepts/architecture-0.svg | 177 ++++++++++++++++ .../d2/docs/id/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/id/concepts/architecture-2.svg | 175 ++++++++++++++++ .../d2/docs/id/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/id/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/id/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/id/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/id/concepts/architecture-7.svg | 178 +++++++++++++++++ docs/public/d2/docs/id/concepts/bridge-0.svg | 189 ++++++++++++++++++ docs/public/d2/docs/id/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/id/concepts/lifecycle-0.svg | 185 +++++++++++++++++ .../d2/docs/id/concepts/lifecycle-1.svg | 184 +++++++++++++++++ .../id/contributing/codebase-layout-0.svg | 184 +++++++++++++++++ .../d2/docs/ja/concepts/architecture-0.svg | 186 +++++++++++++++++ .../d2/docs/ja/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/ja/concepts/architecture-2.svg | 178 +++++++++++++++++ .../d2/docs/ja/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/ja/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/ja/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/ja/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/ja/concepts/architecture-7.svg | 178 +++++++++++++++++ docs/public/d2/docs/ja/concepts/bridge-0.svg | 189 ++++++++++++++++++ docs/public/d2/docs/ja/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/ja/concepts/lifecycle-0.svg | 185 +++++++++++++++++ .../d2/docs/ko/concepts/architecture-0.svg | 186 +++++++++++++++++ .../d2/docs/ko/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/ko/concepts/architecture-2.svg | 178 +++++++++++++++++ .../d2/docs/ko/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/ko/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/ko/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/ko/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/ko/concepts/architecture-7.svg | 178 +++++++++++++++++ docs/public/d2/docs/ko/concepts/bridge-0.svg | 189 ++++++++++++++++++ docs/public/d2/docs/ko/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/ko/concepts/lifecycle-0.svg | 185 +++++++++++++++++ .../d2/docs/pt/concepts/architecture-0.svg | 186 +++++++++++++++++ .../d2/docs/pt/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/pt/concepts/architecture-2.svg | 178 +++++++++++++++++ .../d2/docs/pt/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/pt/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/pt/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/pt/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/pt/concepts/architecture-7.svg | 178 +++++++++++++++++ docs/public/d2/docs/pt/concepts/bridge-0.svg | 189 ++++++++++++++++++ docs/public/d2/docs/pt/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/pt/concepts/lifecycle-0.svg | 185 +++++++++++++++++ .../d2/docs/ru/concepts/architecture-0.svg | 186 +++++++++++++++++ .../d2/docs/ru/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/ru/concepts/architecture-2.svg | 178 +++++++++++++++++ .../d2/docs/ru/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/ru/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/ru/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/ru/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/ru/concepts/architecture-7.svg | 178 +++++++++++++++++ docs/public/d2/docs/ru/concepts/bridge-0.svg | 189 ++++++++++++++++++ docs/public/d2/docs/ru/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/ru/concepts/lifecycle-0.svg | 185 +++++++++++++++++ .../d2/docs/zh-cn/concepts/architecture-0.svg | 177 ++++++++++++++++ .../d2/docs/zh-cn/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/zh-cn/concepts/architecture-2.svg | 178 +++++++++++++++++ .../d2/docs/zh-cn/concepts/architecture-3.svg | 174 ++++++++++++++++ .../d2/docs/zh-cn/concepts/bridge-0.svg | 189 ++++++++++++++++++ .../d2/docs/zh-cn/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/zh-cn/concepts/lifecycle-0.svg | 185 +++++++++++++++++ .../d2/docs/zh-tw/concepts/architecture-0.svg | 186 +++++++++++++++++ .../d2/docs/zh-tw/concepts/architecture-1.svg | 185 +++++++++++++++++ .../d2/docs/zh-tw/concepts/architecture-2.svg | 178 +++++++++++++++++ .../d2/docs/zh-tw/concepts/architecture-3.svg | 182 +++++++++++++++++ .../d2/docs/zh-tw/concepts/architecture-4.svg | 184 +++++++++++++++++ .../d2/docs/zh-tw/concepts/architecture-5.svg | 176 ++++++++++++++++ .../d2/docs/zh-tw/concepts/architecture-6.svg | 182 +++++++++++++++++ .../d2/docs/zh-tw/concepts/architecture-7.svg | 178 +++++++++++++++++ .../d2/docs/zh-tw/concepts/bridge-0.svg | 189 ++++++++++++++++++ .../d2/docs/zh-tw/concepts/bridge-1.svg | 188 +++++++++++++++++ .../d2/docs/zh-tw/concepts/lifecycle-0.svg | 185 +++++++++++++++++ v3/UNRELEASED_CHANGELOG.md | 1 + v3/pkg/application/webview_window_windows.go | 15 +- 112 files changed, 20119 insertions(+), 2 deletions(-) create mode 100644 docs/public/d2/docs/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/concepts/lifecycle-1.svg create mode 100644 docs/public/d2/docs/contributing/codebase-layout-0.svg create mode 100644 docs/public/d2/docs/de/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/de/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/de/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/de/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/de/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/de/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/de/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/de/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/de/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/de/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/de/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/fr/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/fr/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/fr/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/fr/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/fr/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/fr/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/fr/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/fr/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/fr/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/fr/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/fr/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/id/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/id/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/id/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/id/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/id/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/id/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/id/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/id/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/id/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/id/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/id/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/id/concepts/lifecycle-1.svg create mode 100644 docs/public/d2/docs/id/contributing/codebase-layout-0.svg create mode 100644 docs/public/d2/docs/ja/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/ja/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/ja/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/ja/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/ja/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/ja/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/ja/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/ja/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/ja/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/ja/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/ja/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/ko/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/ko/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/ko/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/ko/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/ko/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/ko/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/ko/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/ko/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/ko/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/ko/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/ko/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/pt/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/pt/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/pt/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/pt/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/pt/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/pt/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/pt/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/pt/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/pt/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/pt/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/pt/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/ru/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/ru/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/ru/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/ru/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/ru/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/ru/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/ru/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/ru/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/ru/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/ru/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/ru/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/zh-cn/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/zh-cn/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/zh-cn/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/zh-cn/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/zh-cn/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/zh-cn/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/zh-cn/concepts/lifecycle-0.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/architecture-0.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/architecture-1.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/architecture-2.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/architecture-3.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/architecture-4.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/architecture-5.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/architecture-6.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/architecture-7.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/bridge-0.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/bridge-1.svg create mode 100644 docs/public/d2/docs/zh-tw/concepts/lifecycle-0.svg diff --git a/docs/public/d2/docs/concepts/architecture-0.svg b/docs/public/d2/docs/concepts/architecture-0.svg new file mode 100644 index 00000000000..73f8fde3387 --- /dev/null +++ b/docs/public/d2/docs/concepts/architecture-0.svg @@ -0,0 +1,177 @@ +Wails AppFrontendGo BackendOperating SystemInitialisationRegular Communication HTML / JS / CSSJSONCall System APIsJSONServes Static Web AppRender Site via WebKitMake API-style callProcess responseService processes requestGenerate Response + + + + + + diff --git a/docs/public/d2/docs/concepts/architecture-1.svg b/docs/public/d2/docs/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/concepts/architecture-2.svg b/docs/public/d2/docs/concepts/architecture-2.svg new file mode 100644 index 00000000000..d22084c3e5b --- /dev/null +++ b/docs/public/d2/docs/concepts/architecture-2.svg @@ -0,0 +1,175 @@ +Wails Event SystemWindow 1Window 2Go BackendEvent Driver JSON Event BusJSON Event BusSubscribe to 'data-updated' eventsApp Emit('data-updated', data)Subscriber processes On('data-updated', handler) + + + + diff --git a/docs/public/d2/docs/concepts/architecture-3.svg b/docs/public/d2/docs/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/concepts/architecture-4.svg b/docs/public/d2/docs/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/concepts/architecture-5.svg b/docs/public/d2/docs/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/concepts/architecture-6.svg b/docs/public/d2/docs/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/concepts/architecture-7.svg b/docs/public/d2/docs/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/concepts/bridge-0.svg b/docs/public/d2/docs/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/concepts/bridge-1.svg b/docs/public/d2/docs/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/concepts/lifecycle-0.svg b/docs/public/d2/docs/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/concepts/lifecycle-1.svg b/docs/public/d2/docs/concepts/lifecycle-1.svg new file mode 100644 index 00000000000..b1b7e5b8a13 --- /dev/null +++ b/docs/public/d2/docs/concepts/lifecycle-1.svg @@ -0,0 +1,184 @@ +Create WindowLoad FrontendShow WindowWindow ActiveClose RequestWindowClosing HookDestroy WindowWindow ClosedHandle Events LoopUser closesCancelledAllowed + + + + + + diff --git a/docs/public/d2/docs/contributing/codebase-layout-0.svg b/docs/public/d2/docs/contributing/codebase-layout-0.svg new file mode 100644 index 00000000000..d782469fc7a --- /dev/null +++ b/docs/public/d2/docs/contributing/codebase-layout-0.svg @@ -0,0 +1,184 @@ +wails3 CLIinternal/generatorassetserver (dev)internal/packagerApp runtimeApplicationPkgInternalRuntimeOSAPIspkg.applicationinternal.runtimeOS APIs build / generatedevpackagebindings + + + + + + diff --git a/docs/public/d2/docs/de/concepts/architecture-0.svg b/docs/public/d2/docs/de/concepts/architecture-0.svg new file mode 100644 index 00000000000..18a6592d3f7 --- /dev/null +++ b/docs/public/d2/docs/de/concepts/architecture-0.svg @@ -0,0 +1,186 @@ +UserYour Wails ApplicationOperating SystemFrontend(HTML/CSS/JS)Wails RuntimeGo BackendNative WebView(WebKit/WebView2/WebKitGTK)System APIs(Windows/macOS/Linux)Message BridgeType-Safe BindingsYour ServicesOS APIs Interacts with UI JSON messagesDirect function callsTypeScript definitionsRenders inNative calls + + + + + + + + diff --git a/docs/public/d2/docs/de/concepts/architecture-1.svg b/docs/public/d2/docs/de/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/de/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/de/concepts/architecture-2.svg b/docs/public/d2/docs/de/concepts/architecture-2.svg new file mode 100644 index 00000000000..8da716630c7 --- /dev/null +++ b/docs/public/d2/docs/de/concepts/architecture-2.svg @@ -0,0 +1,178 @@ +Go ServiceEvent BusWindow 1Window 2 Emit('data-updated', data)Notify subscribersNotify subscribersOn('data-updated', handler)On('data-updated', handler) + + + + + + + diff --git a/docs/public/d2/docs/de/concepts/architecture-3.svg b/docs/public/d2/docs/de/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/de/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/de/concepts/architecture-4.svg b/docs/public/d2/docs/de/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/de/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/de/concepts/architecture-5.svg b/docs/public/d2/docs/de/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/de/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/de/concepts/architecture-6.svg b/docs/public/d2/docs/de/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/de/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/de/concepts/architecture-7.svg b/docs/public/d2/docs/de/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/de/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/de/concepts/bridge-0.svg b/docs/public/d2/docs/de/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/de/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/de/concepts/bridge-1.svg b/docs/public/d2/docs/de/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/de/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/de/concepts/lifecycle-0.svg b/docs/public/d2/docs/de/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/de/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/fr/concepts/architecture-0.svg b/docs/public/d2/docs/fr/concepts/architecture-0.svg new file mode 100644 index 00000000000..18a6592d3f7 --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/architecture-0.svg @@ -0,0 +1,186 @@ +UserYour Wails ApplicationOperating SystemFrontend(HTML/CSS/JS)Wails RuntimeGo BackendNative WebView(WebKit/WebView2/WebKitGTK)System APIs(Windows/macOS/Linux)Message BridgeType-Safe BindingsYour ServicesOS APIs Interacts with UI JSON messagesDirect function callsTypeScript definitionsRenders inNative calls + + + + + + + + diff --git a/docs/public/d2/docs/fr/concepts/architecture-1.svg b/docs/public/d2/docs/fr/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/fr/concepts/architecture-2.svg b/docs/public/d2/docs/fr/concepts/architecture-2.svg new file mode 100644 index 00000000000..8da716630c7 --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/architecture-2.svg @@ -0,0 +1,178 @@ +Go ServiceEvent BusWindow 1Window 2 Emit('data-updated', data)Notify subscribersNotify subscribersOn('data-updated', handler)On('data-updated', handler) + + + + + + + diff --git a/docs/public/d2/docs/fr/concepts/architecture-3.svg b/docs/public/d2/docs/fr/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/fr/concepts/architecture-4.svg b/docs/public/d2/docs/fr/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/fr/concepts/architecture-5.svg b/docs/public/d2/docs/fr/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/fr/concepts/architecture-6.svg b/docs/public/d2/docs/fr/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/fr/concepts/architecture-7.svg b/docs/public/d2/docs/fr/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/fr/concepts/bridge-0.svg b/docs/public/d2/docs/fr/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/fr/concepts/bridge-1.svg b/docs/public/d2/docs/fr/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/fr/concepts/lifecycle-0.svg b/docs/public/d2/docs/fr/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/fr/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/id/concepts/architecture-0.svg b/docs/public/d2/docs/id/concepts/architecture-0.svg new file mode 100644 index 00000000000..73f8fde3387 --- /dev/null +++ b/docs/public/d2/docs/id/concepts/architecture-0.svg @@ -0,0 +1,177 @@ +Wails AppFrontendGo BackendOperating SystemInitialisationRegular Communication HTML / JS / CSSJSONCall System APIsJSONServes Static Web AppRender Site via WebKitMake API-style callProcess responseService processes requestGenerate Response + + + + + + diff --git a/docs/public/d2/docs/id/concepts/architecture-1.svg b/docs/public/d2/docs/id/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/id/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/id/concepts/architecture-2.svg b/docs/public/d2/docs/id/concepts/architecture-2.svg new file mode 100644 index 00000000000..d22084c3e5b --- /dev/null +++ b/docs/public/d2/docs/id/concepts/architecture-2.svg @@ -0,0 +1,175 @@ +Wails Event SystemWindow 1Window 2Go BackendEvent Driver JSON Event BusJSON Event BusSubscribe to 'data-updated' eventsApp Emit('data-updated', data)Subscriber processes On('data-updated', handler) + + + + diff --git a/docs/public/d2/docs/id/concepts/architecture-3.svg b/docs/public/d2/docs/id/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/id/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/id/concepts/architecture-4.svg b/docs/public/d2/docs/id/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/id/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/id/concepts/architecture-5.svg b/docs/public/d2/docs/id/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/id/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/id/concepts/architecture-6.svg b/docs/public/d2/docs/id/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/id/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/id/concepts/architecture-7.svg b/docs/public/d2/docs/id/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/id/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/id/concepts/bridge-0.svg b/docs/public/d2/docs/id/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/id/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/id/concepts/bridge-1.svg b/docs/public/d2/docs/id/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/id/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/id/concepts/lifecycle-0.svg b/docs/public/d2/docs/id/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/id/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/id/concepts/lifecycle-1.svg b/docs/public/d2/docs/id/concepts/lifecycle-1.svg new file mode 100644 index 00000000000..b1b7e5b8a13 --- /dev/null +++ b/docs/public/d2/docs/id/concepts/lifecycle-1.svg @@ -0,0 +1,184 @@ +Create WindowLoad FrontendShow WindowWindow ActiveClose RequestWindowClosing HookDestroy WindowWindow ClosedHandle Events LoopUser closesCancelledAllowed + + + + + + diff --git a/docs/public/d2/docs/id/contributing/codebase-layout-0.svg b/docs/public/d2/docs/id/contributing/codebase-layout-0.svg new file mode 100644 index 00000000000..d782469fc7a --- /dev/null +++ b/docs/public/d2/docs/id/contributing/codebase-layout-0.svg @@ -0,0 +1,184 @@ +wails3 CLIinternal/generatorassetserver (dev)internal/packagerApp runtimeApplicationPkgInternalRuntimeOSAPIspkg.applicationinternal.runtimeOS APIs build / generatedevpackagebindings + + + + + + diff --git a/docs/public/d2/docs/ja/concepts/architecture-0.svg b/docs/public/d2/docs/ja/concepts/architecture-0.svg new file mode 100644 index 00000000000..18a6592d3f7 --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/architecture-0.svg @@ -0,0 +1,186 @@ +UserYour Wails ApplicationOperating SystemFrontend(HTML/CSS/JS)Wails RuntimeGo BackendNative WebView(WebKit/WebView2/WebKitGTK)System APIs(Windows/macOS/Linux)Message BridgeType-Safe BindingsYour ServicesOS APIs Interacts with UI JSON messagesDirect function callsTypeScript definitionsRenders inNative calls + + + + + + + + diff --git a/docs/public/d2/docs/ja/concepts/architecture-1.svg b/docs/public/d2/docs/ja/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/ja/concepts/architecture-2.svg b/docs/public/d2/docs/ja/concepts/architecture-2.svg new file mode 100644 index 00000000000..8da716630c7 --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/architecture-2.svg @@ -0,0 +1,178 @@ +Go ServiceEvent BusWindow 1Window 2 Emit('data-updated', data)Notify subscribersNotify subscribersOn('data-updated', handler)On('data-updated', handler) + + + + + + + diff --git a/docs/public/d2/docs/ja/concepts/architecture-3.svg b/docs/public/d2/docs/ja/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/ja/concepts/architecture-4.svg b/docs/public/d2/docs/ja/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/ja/concepts/architecture-5.svg b/docs/public/d2/docs/ja/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/ja/concepts/architecture-6.svg b/docs/public/d2/docs/ja/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/ja/concepts/architecture-7.svg b/docs/public/d2/docs/ja/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/ja/concepts/bridge-0.svg b/docs/public/d2/docs/ja/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/ja/concepts/bridge-1.svg b/docs/public/d2/docs/ja/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/ja/concepts/lifecycle-0.svg b/docs/public/d2/docs/ja/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/ja/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/ko/concepts/architecture-0.svg b/docs/public/d2/docs/ko/concepts/architecture-0.svg new file mode 100644 index 00000000000..18a6592d3f7 --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/architecture-0.svg @@ -0,0 +1,186 @@ +UserYour Wails ApplicationOperating SystemFrontend(HTML/CSS/JS)Wails RuntimeGo BackendNative WebView(WebKit/WebView2/WebKitGTK)System APIs(Windows/macOS/Linux)Message BridgeType-Safe BindingsYour ServicesOS APIs Interacts with UI JSON messagesDirect function callsTypeScript definitionsRenders inNative calls + + + + + + + + diff --git a/docs/public/d2/docs/ko/concepts/architecture-1.svg b/docs/public/d2/docs/ko/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/ko/concepts/architecture-2.svg b/docs/public/d2/docs/ko/concepts/architecture-2.svg new file mode 100644 index 00000000000..8da716630c7 --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/architecture-2.svg @@ -0,0 +1,178 @@ +Go ServiceEvent BusWindow 1Window 2 Emit('data-updated', data)Notify subscribersNotify subscribersOn('data-updated', handler)On('data-updated', handler) + + + + + + + diff --git a/docs/public/d2/docs/ko/concepts/architecture-3.svg b/docs/public/d2/docs/ko/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/ko/concepts/architecture-4.svg b/docs/public/d2/docs/ko/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/ko/concepts/architecture-5.svg b/docs/public/d2/docs/ko/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/ko/concepts/architecture-6.svg b/docs/public/d2/docs/ko/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/ko/concepts/architecture-7.svg b/docs/public/d2/docs/ko/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/ko/concepts/bridge-0.svg b/docs/public/d2/docs/ko/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/ko/concepts/bridge-1.svg b/docs/public/d2/docs/ko/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/ko/concepts/lifecycle-0.svg b/docs/public/d2/docs/ko/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/ko/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/pt/concepts/architecture-0.svg b/docs/public/d2/docs/pt/concepts/architecture-0.svg new file mode 100644 index 00000000000..18a6592d3f7 --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/architecture-0.svg @@ -0,0 +1,186 @@ +UserYour Wails ApplicationOperating SystemFrontend(HTML/CSS/JS)Wails RuntimeGo BackendNative WebView(WebKit/WebView2/WebKitGTK)System APIs(Windows/macOS/Linux)Message BridgeType-Safe BindingsYour ServicesOS APIs Interacts with UI JSON messagesDirect function callsTypeScript definitionsRenders inNative calls + + + + + + + + diff --git a/docs/public/d2/docs/pt/concepts/architecture-1.svg b/docs/public/d2/docs/pt/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/pt/concepts/architecture-2.svg b/docs/public/d2/docs/pt/concepts/architecture-2.svg new file mode 100644 index 00000000000..8da716630c7 --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/architecture-2.svg @@ -0,0 +1,178 @@ +Go ServiceEvent BusWindow 1Window 2 Emit('data-updated', data)Notify subscribersNotify subscribersOn('data-updated', handler)On('data-updated', handler) + + + + + + + diff --git a/docs/public/d2/docs/pt/concepts/architecture-3.svg b/docs/public/d2/docs/pt/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/pt/concepts/architecture-4.svg b/docs/public/d2/docs/pt/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/pt/concepts/architecture-5.svg b/docs/public/d2/docs/pt/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/pt/concepts/architecture-6.svg b/docs/public/d2/docs/pt/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/pt/concepts/architecture-7.svg b/docs/public/d2/docs/pt/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/pt/concepts/bridge-0.svg b/docs/public/d2/docs/pt/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/pt/concepts/bridge-1.svg b/docs/public/d2/docs/pt/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/pt/concepts/lifecycle-0.svg b/docs/public/d2/docs/pt/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/pt/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/ru/concepts/architecture-0.svg b/docs/public/d2/docs/ru/concepts/architecture-0.svg new file mode 100644 index 00000000000..18a6592d3f7 --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/architecture-0.svg @@ -0,0 +1,186 @@ +UserYour Wails ApplicationOperating SystemFrontend(HTML/CSS/JS)Wails RuntimeGo BackendNative WebView(WebKit/WebView2/WebKitGTK)System APIs(Windows/macOS/Linux)Message BridgeType-Safe BindingsYour ServicesOS APIs Interacts with UI JSON messagesDirect function callsTypeScript definitionsRenders inNative calls + + + + + + + + diff --git a/docs/public/d2/docs/ru/concepts/architecture-1.svg b/docs/public/d2/docs/ru/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/ru/concepts/architecture-2.svg b/docs/public/d2/docs/ru/concepts/architecture-2.svg new file mode 100644 index 00000000000..8da716630c7 --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/architecture-2.svg @@ -0,0 +1,178 @@ +Go ServiceEvent BusWindow 1Window 2 Emit('data-updated', data)Notify subscribersNotify subscribersOn('data-updated', handler)On('data-updated', handler) + + + + + + + diff --git a/docs/public/d2/docs/ru/concepts/architecture-3.svg b/docs/public/d2/docs/ru/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/ru/concepts/architecture-4.svg b/docs/public/d2/docs/ru/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/ru/concepts/architecture-5.svg b/docs/public/d2/docs/ru/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/ru/concepts/architecture-6.svg b/docs/public/d2/docs/ru/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/ru/concepts/architecture-7.svg b/docs/public/d2/docs/ru/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/ru/concepts/bridge-0.svg b/docs/public/d2/docs/ru/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/ru/concepts/bridge-1.svg b/docs/public/d2/docs/ru/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/ru/concepts/lifecycle-0.svg b/docs/public/d2/docs/ru/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/ru/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/zh-cn/concepts/architecture-0.svg b/docs/public/d2/docs/zh-cn/concepts/architecture-0.svg new file mode 100644 index 00000000000..7166257e254 --- /dev/null +++ b/docs/public/d2/docs/zh-cn/concepts/architecture-0.svg @@ -0,0 +1,177 @@ +Wails App前端Go 后端操作系统InitialisationRegular Communication HTML / JS / CSSJSON调用系统 APIJSON提供静态 Web 应用通过 WebKit 渲染站点发起 API 调用处理响应服务处理请求生成响应 + + + + + + diff --git a/docs/public/d2/docs/zh-cn/concepts/architecture-1.svg b/docs/public/d2/docs/zh-cn/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/zh-cn/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/zh-cn/concepts/architecture-2.svg b/docs/public/d2/docs/zh-cn/concepts/architecture-2.svg new file mode 100644 index 00000000000..8da716630c7 --- /dev/null +++ b/docs/public/d2/docs/zh-cn/concepts/architecture-2.svg @@ -0,0 +1,178 @@ +Go ServiceEvent BusWindow 1Window 2 Emit('data-updated', data)Notify subscribersNotify subscribersOn('data-updated', handler)On('data-updated', handler) + + + + + + + diff --git a/docs/public/d2/docs/zh-cn/concepts/architecture-3.svg b/docs/public/d2/docs/zh-cn/concepts/architecture-3.svg new file mode 100644 index 00000000000..8ebb10e5d81 --- /dev/null +++ b/docs/public/d2/docs/zh-cn/concepts/architecture-3.svg @@ -0,0 +1,174 @@ +应用启动初始化事件循环关闭应用退出创建应用注册服务创建窗口和菜单处理事件处理消息更新界面清理资源保存状态 + + + diff --git a/docs/public/d2/docs/zh-cn/concepts/bridge-0.svg b/docs/public/d2/docs/zh-cn/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/zh-cn/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/zh-cn/concepts/bridge-1.svg b/docs/public/d2/docs/zh-cn/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/zh-cn/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/zh-cn/concepts/lifecycle-0.svg b/docs/public/d2/docs/zh-cn/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/zh-cn/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/architecture-0.svg b/docs/public/d2/docs/zh-tw/concepts/architecture-0.svg new file mode 100644 index 00000000000..18a6592d3f7 --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/architecture-0.svg @@ -0,0 +1,186 @@ +UserYour Wails ApplicationOperating SystemFrontend(HTML/CSS/JS)Wails RuntimeGo BackendNative WebView(WebKit/WebView2/WebKitGTK)System APIs(Windows/macOS/Linux)Message BridgeType-Safe BindingsYour ServicesOS APIs Interacts with UI JSON messagesDirect function callsTypeScript definitionsRenders inNative calls + + + + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/architecture-1.svg b/docs/public/d2/docs/zh-tw/concepts/architecture-1.svg new file mode 100644 index 00000000000..9b11d23ec9c --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/architecture-1.svg @@ -0,0 +1,185 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)JSON EncoderMethod RouterJSON DecoderRegistered Services 1. Call Go methodGreet('Alice')2. Encode to JSON{method: 'Greet', args: ['Alice']}3. Route to serviceGreetService.Greet('Alice')4. Return result'Hello, Alice!'5. Decode to JSPromise resolves + + + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/architecture-2.svg b/docs/public/d2/docs/zh-tw/concepts/architecture-2.svg new file mode 100644 index 00000000000..8da716630c7 --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/architecture-2.svg @@ -0,0 +1,178 @@ +Go ServiceEvent BusWindow 1Window 2 Emit('data-updated', data)Notify subscribersNotify subscribersOn('data-updated', handler)On('data-updated', handler) + + + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/architecture-3.svg b/docs/public/d2/docs/zh-tw/concepts/architecture-3.svg new file mode 100644 index 00000000000..dc7a3e8f9e8 --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/architecture-3.svg @@ -0,0 +1,182 @@ +Application StartInitialisationEvent LoopShutdownApplication EndCreate ApplicationRegister ServicesSetup Windows/MenusProcess EventsHandle MessagesUpdate UICleanup ResourcesSave State LoopQuit signal + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/architecture-4.svg b/docs/public/d2/docs/zh-tw/concepts/architecture-4.svg new file mode 100644 index 00000000000..be73f2b39bb --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/architecture-4.svg @@ -0,0 +1,184 @@ +Source CodeBuild ProcessOutputGo Code(main.go, services)Frontend Code(HTML/CSS/JS)Analyse Go CodeGenerate BindingsBuild FrontendCompile GoEmbed AssetsNative Binary(myapp.exe/.app) Extract typesTypeScript bindingsCompile (Vite/webpack)Bundled assets + + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/architecture-5.svg b/docs/public/d2/docs/zh-tw/concepts/architecture-5.svg new file mode 100644 index 00000000000..3da3e5ffdcc --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/architecture-5.svg @@ -0,0 +1,176 @@ +Wails AppVite Dev Server(localhost:5173)WebView Proxy requestsServe with HMRCall Go methods + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/architecture-6.svg b/docs/public/d2/docs/zh-tw/concepts/architecture-6.svg new file mode 100644 index 00000000000..f48181a7197 --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/architecture-6.svg @@ -0,0 +1,182 @@ +Single Binary(myapp.exe)WebViewCompiled GoEmbedded Assets(HTML/CSS/JS) Serve from memoryCall Go methods + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/architecture-7.svg b/docs/public/d2/docs/zh-tw/concepts/architecture-7.svg new file mode 100644 index 00000000000..eddc7f2c493 --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/architecture-7.svg @@ -0,0 +1,178 @@ +Frontend (Untrusted)Wails Bridge (Validation)Backend (Trusted) Call methodValidate:- Method exists?- Types correct?- Access allowed?Execute if validReturn resultSend response + + + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/bridge-0.svg b/docs/public/d2/docs/zh-tw/concepts/bridge-0.svg new file mode 100644 index 00000000000..9a355bc72f5 --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/bridge-0.svg @@ -0,0 +1,189 @@ +Frontend (JavaScript)Wails BridgeBackend (Go)React/Vue/VanillaAuto-Generated BindingsJSON EncoderMethod RouterJSON DecoderType GeneratorYour ServicesService Registry import { Method }Call Method('arg')Encode to JSONFind serviceInvoke methodReturn resultDecode to JSPromise resolvesGenerate types + + + + + + + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/bridge-1.svg b/docs/public/d2/docs/zh-tw/concepts/bridge-1.svg new file mode 100644 index 00000000000..4ce30a82c29 --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/bridge-1.svg @@ -0,0 +1,188 @@ +Receive MessageParse JSONValidateInvoke Go MethodEncode ResultSend ResponseSend ErrorService exists?Method exists?Types correct? YesNoYesNoYesNoSuccessError + + + + + + + + + + diff --git a/docs/public/d2/docs/zh-tw/concepts/lifecycle-0.svg b/docs/public/d2/docs/zh-tw/concepts/lifecycle-0.svg new file mode 100644 index 00000000000..107f0f63d20 --- /dev/null +++ b/docs/public/d2/docs/zh-tw/concepts/lifecycle-0.svg @@ -0,0 +1,185 @@ +Application StartInitialisationapp.Run()Service StartupEvent LoopQuit SignalShouldQuit CheckOnShutdown CallbacksService ShutdownCleanupApplication EndParse OptionsRegister ServicesSetup RuntimeProcess EventsHandle MessagesUpdate UIClose WindowsRelease Resources LoopUser quitsCheck allowed?DeniedAllowed + + + + + + + diff --git a/v3/UNRELEASED_CHANGELOG.md b/v3/UNRELEASED_CHANGELOG.md index 3f00b280299..67fb624f9b0 100644 --- a/v3/UNRELEASED_CHANGELOG.md +++ b/v3/UNRELEASED_CHANGELOG.md @@ -25,6 +25,7 @@ After processing, the content will be moved to the main changelog and this file ## Fixed - Fix 32-bit build failure in the updater: the `maxArchiveTotalSize` constant (2 GiB) overflowed the platform `int` when passed to `fmt.Errorf` on `GOARCH=386`. It is now explicitly typed `int64`. +- Fix a nil-pointer panic on startup when a window uses a Dark (or system-dark) title bar on Windows builds that do not load the dark-mode uxtheme APIs, such as Windows 10 1809 / Windows Server 2019 (build 17763). The `AllowDarkModeForWindow` calls in the window theme setup are now nil-guarded, matching the guard already used in `w32.SetMenuTheme`. ## Deprecated diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index c3f1a78b642..330a6894817 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -564,7 +564,7 @@ func (w *windowsWebviewWindow) run() { case SystemDefault: isDark := w32.IsCurrentlyDarkMode() if isDark { - w32.AllowDarkModeForWindow(w.hwnd, true) + w.applyDarkMode() } w.updateTheme(isDark) // Don't initialize default dark theme here if custom theme might be set @@ -577,7 +577,7 @@ func (w *windowsWebviewWindow) run() { case Light: w.updateTheme(false) case Dark: - w32.AllowDarkModeForWindow(w.hwnd, true) + w.applyDarkMode() w.updateTheme(true) // Don't initialize default dark theme here if custom theme might be set // The updateTheme call above will handle custom themes @@ -1447,6 +1447,17 @@ func (w *windowsWebviewWindow) disableIcon() { ) } +// applyDarkMode opts the window into dark mode via the uxtheme +// AllowDarkModeForWindow export. That export is only loaded on Windows builds +// that provide it (>= 18334); on older builds such as Windows 10 1809 / build +// 17763 it is nil, so this guards the call to avoid a nil-pointer panic on +// startup. +func (w *windowsWebviewWindow) applyDarkMode() { + if w32.AllowDarkModeForWindow != nil { + w32.AllowDarkModeForWindow(w.hwnd, true) + } +} + func (w *windowsWebviewWindow) processThemeColour(fn func(w32.HWND, uint32), value *uint32) { if value == nil { return From d7168e89b128a521cb1608bb884e561d5d257f3b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Jul 2026 09:43:31 +0000 Subject: [PATCH 5/6] =?UTF-8?q?chore(changelog):=20auto-add=20entry=20for?= =?UTF-8?q?=20PR=20#5793=20=E2=80=94=20fix(v3):=20guard=20nil=20AllowDarkM?= =?UTF-8?q?odeForWindow=20to=20avoid=20startup=20panic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v3/UNRELEASED_CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/v3/UNRELEASED_CHANGELOG.md b/v3/UNRELEASED_CHANGELOG.md index 67fb624f9b0..2326b1e7987 100644 --- a/v3/UNRELEASED_CHANGELOG.md +++ b/v3/UNRELEASED_CHANGELOG.md @@ -24,6 +24,7 @@ After processing, the content will be moved to the main changelog and this file ## Fixed +- Guard Windows dark-mode initialization against nil API calls in [PR](https://github.com/wailsapp/wails/pull/5793) by @roachadam - Fix 32-bit build failure in the updater: the `maxArchiveTotalSize` constant (2 GiB) overflowed the platform `int` when passed to `fmt.Errorf` on `GOARCH=386`. It is now explicitly typed `int64`. - Fix a nil-pointer panic on startup when a window uses a Dark (or system-dark) title bar on Windows builds that do not load the dark-mode uxtheme APIs, such as Windows 10 1809 / Windows Server 2019 (build 17763). The `AllowDarkModeForWindow` calls in the window theme setup are now nil-guarded, matching the guard already used in `w32.SetMenuTheme`. From ab3963ca644b5ed04c3e818f208b318f69e5dedc Mon Sep 17 00:00:00 2001 From: taliesin-ai Date: Sun, 26 Jul 2026 19:53:58 +1000 Subject: [PATCH 6/6] ci(v3): keep @wailsio/runtime in lockstep with the CLI version (#5820) The npm package version was produced by `npm version prerelease`, which increments the trailing numeric identifier and knows nothing about the release channel. That is how the two series drifted: the CLI went alpha -> alpha2 -> beta while npm kept counting alpha.N. Today the CLI is v3.0.0-alpha2.117 and npm is 3.0.0-alpha.97, and at beta a v3.0.0-beta.0 CLI would have shipped alongside an "alpha" runtime, with every upgrading user needing to be told the mismatch was expected. The runtime version now comes from v3/internal/version/version.txt, the same file go:embed puts into the CLI, so the two always agree. Because the version now only moves when version.txt moves, a run triggered by a runtime source change between releases would try to republish an existing version. Such runs now skip the publish step while still committing regenerated assets, and version.txt is added to the trigger and detection paths so a release that moves it does publish. Merging this publishes nothing: a workflow-file-only change does not match the detect job's file lists, so the publish job does not run. The next publish happens when version.txt next moves, and it will be 3.0.0-alpha2.117 rather than 3.0.0-alpha.98. That sorts higher, so nothing downstream breaks. Verified: actionlint clean; version derivation exercised for both the current master value and the beta value; the already-published guard correctly detects 3.0.0-alpha.97 as present and 3.0.0-beta.0 as absent. Claude-Session: https://claude.ai/code/session_01FigQqUQbNu9ngE4a2CSNm8 Co-authored-by: taliesin-ai --- .github/workflows/publish-npm.yml | 52 +++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 86b405ec61c..8c5394cd593 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -6,6 +6,9 @@ on: # Self-heal: if bundle bytes ever change on master without a matching # source change, this rebuild overwrites them with source-derived output. - 'v3/internal/assetserver/bundledassets/**' + # The runtime version is derived from this file, so a release that moves + # it must trigger a publish. + - 'v3/internal/version/version.txt' - '.github/workflows/publish-npm.yml' workflow_dispatch: @@ -47,6 +50,7 @@ jobs: v3/internal/runtime/desktop/@wailsio/runtime/tsconfig.json v3/internal/runtime/desktop/@wailsio/runtime/src/** v3/internal/assetserver/bundledassets/** + v3/internal/version/version.txt v3/pkg/events/events.txt v3/tasks/events/** @@ -135,11 +139,46 @@ jobs: done echo "All expected runtime artifacts were generated." - - name: Bump version + - name: Set version from the CLI version file id: bump-version - working-directory: v3/internal/runtime/desktop/@wailsio/runtime + # The npm package version is taken from v3/internal/version/version.txt, + # the same file go:embed puts into the CLI, so the runtime and the CLI + # always report the same version. + # + # This replaces `npm version prerelease`, which incremented the trailing + # numeric identifier with no knowledge of the release channel. That is + # how the two version series drifted apart: the CLI moved alpha -> + # alpha2 -> beta while npm kept counting alpha.N, so a beta CLI shipped + # next to an "alpha" runtime and every upgrading user had to be told + # that the mismatch was expected. + run: | + set -euo pipefail + VERSION="$(tr -d '[:space:]' < v3/internal/version/version.txt)" + VERSION="${VERSION#v}" + if [[ -z "$VERSION" ]]; then + echo "::error::v3/internal/version/version.txt is empty" + exit 1 + fi + cd v3/internal/runtime/desktop/@wailsio/runtime + npm --no-git-tag-version --allow-same-version version "$VERSION" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "Runtime version set to $VERSION (from version.txt)" + + - name: Skip publish if this version is already on npm + id: already-published + # Lockstep means the version only moves when version.txt moves, so a run + # triggered by a runtime source change between releases would otherwise + # try to republish an existing version and fail. Regenerated assets are + # still committed below; only the publish is skipped. run: | - echo "version=$(npm --no-git-tag-version --force version prerelease)" >> "$GITHUB_OUTPUT" + set -euo pipefail + VERSION="${{ steps.bump-version.outputs.version }}" + if npm view "@wailsio/runtime@${VERSION}" version >/dev/null 2>&1; then + echo "published=true" >> "$GITHUB_OUTPUT" + echo "::notice::@wailsio/runtime@${VERSION} is already on npm; skipping publish. It will publish when version.txt next moves." + else + echo "published=false" >> "$GITHUB_OUTPUT" + fi - name: Commit regenerated runtime + version bump # Commit ALL regenerated tracked files back to master, not just the @@ -172,8 +211,9 @@ jobs: # short-lived publish credential. Provenance is attached automatically. # Requires a Trusted Publisher to be configured for @wailsio/runtime on # npmjs.com (repo: wailsapp/wails, workflow: publish-npm.yml). + if: steps.already-published.outputs.published != 'true' working-directory: v3/internal/runtime/desktop/@wailsio/runtime - # --tag latest: v3 ships prerelease (alpha.N) as the default dist-tag, - # matching the templates' "@wailsio/runtime": "latest" pin. npm >= 11 - # requires an explicit --tag to publish a prerelease as latest. + # --tag latest: v3 ships prereleases as the default dist-tag, matching + # the templates' "@wailsio/runtime": "latest" pin. npm >= 11 requires an + # explicit --tag to publish a prerelease as latest. run: npm publish --access public --tag latest