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
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 816973ad4ef..50608a064a5 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.
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 @@
+
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 20ee330b6fc..c4e533d8fc1 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
@@ -25,6 +26,9 @@ 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`.
## 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
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