Skip to content

Migrate to NucleusFramework: Tao/NativeView desktop WebView (Linux) and drop Wry - #49

Merged
kdroidFilter merged 10 commits into
mainfrom
chore/nucleusframework-rebrand-desktop-noop
Aug 7, 2026
Merged

Migrate to NucleusFramework: Tao/NativeView desktop WebView (Linux) and drop Wry#49
kdroidFilter merged 10 commits into
mainfrom
chore/nucleusframework-rebrand-desktop-noop

Conversation

@kdroidFilter

@kdroidFilter kdroidFilter commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Rebrand the library under NucleusFramework and replace the old Wry desktop backend with a Nucleus Tao + NativeView implementation (WebKit2GTK on Linux). Windows and macOS stay no-op for now.

Rebrand & cleanup

  • Rename packages io.github.kdroidfilterdev.nucleusframework (sources, namespaces, Maven GROUP, demos, iOS bundle id)
  • Remove the wrywebview module entirely (Rust / Wry / UniFFI / Gobley / JNA / Skiko) and related tooling
  • Bump stack: Kotlin 2.4.10, Compose Multiplatform 1.11.1, AGP 8.13.2, coroutines/serialization 1.11.0, lifecycle 2.11.0, maven-publish 0.37.0
  • Drop unsupported iosX64 targets with CMP 1.11

Desktop backend (Linux first)

  • Desktop WebView embeds via Nucleus NativeView + NucleusPlatformView.GtkWidget
  • Native WebKit2GTK JNI library (libcompose_webview_linux.so) under webview-compose/src/jvmMain/native/linux/
  • Full API on Linux: loadUrl / loadHtml / loadHtmlFile, navigation, JS eval, JS bridge (IPC), cookies, request interceptor, screenshots, zoom, opaque white background by default
  • Windows / macOS remain intentional no-ops until their native backends land
  • Requires Tao (nucleusApplication + decorated-window-tao); AWT alone will not embed the view

Demo

  • Uses the Nucleus application plugin (dev.nucleusframework 2.3.0) instead of compose.desktop { application { … } }
  • Entry point runs the visual e2e suite (real Compose window + WebKit + checklist)

Testing

  • Visual e2e suite: 51 cases covering content, navigation, JS, bridge, cookies, interceptor, settings, capture, lifecycle
  • Self-validating (DOM markers, bridge round-trips, cookies, PNG screenshots); writes /tmp/composewebview-visual-suite-report.txt and exits non-zero on failure
  • Locally validated: 51/51 green, allGreen=true

CI natives (Nucleus-style matrix)

  • New reusable workflow .github/workflows/build-natives.yaml:
    • linux-x64 (ubuntu-latest)
    • linux-aarch64 (ubuntu-24.04-arm)
  • Cache + upload natives-linux-* artifacts
  • PR build and Maven publish download natives before compile/publish
  • Native binaries are not committed (gitignored under **/resources/nucleus/native/)
  • Gradle: :webview-compose:buildNativeLinux (or bash webview-compose/src/jvmMain/native/linux/build.sh)

Test plan

  • ./gradlew :webview-compose:compileKotlinJvm :demo:compileKotlinJvm
  • ./gradlew :demo:run (Nucleus plugin) — visual suite 51/51
  • Local Linux native build (build.sh / buildNativeLinux)
  • CI: build-natives matrix (x64 + aarch64) + PR compile with downloaded .so
  • Android / iOS / WasmJs smoke if available
  • Desktop packaging via Nucleus (:demo:package / packageDeb) when needed

Notes for reviewers

  • Desktop apps must use nucleusApplication(backend = NucleusBackend.Tao) and depend on nucleus.decorated-window-tao for embedding to work
  • Default desktop surface is opaque white (desktopWebSettings.transparent = false); set transparent = true only for overlay use cases
  • Windows/macOS desktop: API compiles, rendering remains empty until backends are added

Rename io.github.kdroidfilter to dev.nucleusframework, drop the wrywebview
module (Gobley/JNA/Rust), make desktop a no-op stub, and bump Kotlin/Compose
to 2.4.10 / 1.11.1.
@kdroidFilter kdroidFilter changed the title Migrate to NucleusFramework and remove Wry desktop backend Migrate to NucleusFramework: Tao/NativeView desktop WebView (Linux) and drop Wry Aug 6, 2026
…I natives

Wire desktop WebView through NativeView/WebKit2GTK (Linux only), Nucleus
application plugin + GraalVM metadata, matrix native builds, and a full
visual suite covering the public API.
Wire macOS into the same Tao NativeView path as Linux/Windows, split the
JNI/ObjC backend by domain, and extend visual e2e + CI natives for darwin.
Rename demo hosts to e2e-*, move the visual suite to commonMain with
platform capabilities, expose WebView content overlays, and run the same
catalog on desktop/Android/Wasm/iOS. Remove jvmTest drivers and the
Playwright webview-compose-test module. Wire PR CI for commonTest plus
desktop and Android emulator visual e2e; fix Android JS bridge thread and
cookie removal.
- Download natives into resources/nucleus/native (upload strips parents)
- Move Android emulator suite into a single bash script (runner is line-by-line)
- Run iOS commonTest on macos-15 / Xcode 16+ for Compose 1.11 UIViewLayoutRegion
rememberWebViewState* was re-assigning state.content on every recomposition,
resetting suite mutations (C09) back to the initial boot HTML on Android.

Compose Multiplatform 1.11 needs the iOS 26 SDK (UIViewLayoutRegion); select
Xcode 26.x on the macos-15 runner instead of 16.x.
NSDate.timeIntervalSince1970 is unresolved under the newer Foundation
cinterop; use kotlin.system getTimeMillis/getTimeNanos instead.
getTimeMillis/getTimeNanos are hard errors on Kotlin 2.4 Native.
NSDate.timeIntervalSince1970 needs the top-level extension import
platform.Foundation.timeIntervalSince1970 (same as IOSCookieManager).
@kdroidFilter
kdroidFilter marked this pull request as ready for review August 7, 2026 06:03
@kdroidFilter
kdroidFilter merged commit c224522 into main Aug 7, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant