Skip to content

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

Draft
kdroidFilter wants to merge 6 commits into
mainfrom
chore/nucleusframework-rebrand-desktop-noop
Draft

Migrate to NucleusFramework: Tao/NativeView desktop WebView (Linux) and drop Wry#49
kdroidFilter wants to merge 6 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.
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