|
1 | 1 | # ComposeNativeWebView 🌐 |
2 | 2 |
|
3 | | -**A lightweight Compose Multiplatform WebView** with a |
4 | | -**KevinnZou/compose-webview-multiplatform-inspired API**, backed by **native OS webviews** on every platform. |
| 3 | +**ComposeNativeWebView** is a **Compose Multiplatform WebView** whose **API design and mobile implementations (Android & iOS) are intentionally derived almost verbatim from |
| 4 | +[KevinnZou/compose-webview-multiplatform](https://github.com/KevinnZou/compose-webview-multiplatform)**. |
| 5 | + |
| 6 | +This project exists **first and foremost to bring that same API to Desktop**, backed by **native OS webviews instead of a bundled Chromium runtime**. |
5 | 7 |
|
6 | 8 | ```text |
7 | 9 | io.github.kdroidfilter.webview.* |
8 | 10 | ``` |
9 | 11 |
|
10 | | -✅ Android: `android.webkit.WebView` |
11 | | -✅ iOS: `WKWebView` |
12 | | -✅ Desktop: **Wry (Rust)** via **UniFFI** → WebView2 / WKWebView / WebKitGTK |
| 12 | +### What is reused vs what is new |
| 13 | + |
| 14 | +🟢 **Reused on purpose** |
| 15 | + |
| 16 | +* API surface (`WebViewState`, `WebViewNavigator`, settings, callbacks, mental model) |
| 17 | +* Android implementation (`android.webkit.WebView`) |
| 18 | +* iOS implementation (`WKWebView`) |
| 19 | +* Overall behavior and semantics |
| 20 | + |
| 21 | +👉 If you already know **compose-webview-multiplatform**, you already know how to use this. |
| 22 | + |
| 23 | +🆕 **What ComposeNativeWebView adds** |
| 24 | + |
| 25 | +* **Desktop support with native engines** |
| 26 | +* A **Rust + UniFFI (Wry)** backend instead of KCEF / embedded Chromium |
| 27 | +* A **tiny desktop footprint** with system-provided webviews |
13 | 28 |
|
14 | 29 | --- |
15 | 30 |
|
| 31 | +## Platform backends |
| 32 | + |
| 33 | +✅ **Android**: `android.webkit.WebView` |
| 34 | +✅ **iOS**: `WKWebView` |
| 35 | +✅ **Desktop**: **Wry (Rust)** via **UniFFI** |
| 36 | + |
| 37 | +Desktop engines: |
| 38 | + |
| 39 | +* **Windows**: WebView2 |
| 40 | +* **macOS**: WKWebView |
| 41 | +* **Linux**: WebKitGTK |
| 42 | + |
| 43 | +--- |
16 | 44 | ## Why ComposeNativeWebView? ⚡ |
17 | 45 |
|
18 | 46 | ### Native engines. No bundled Chromium. |
|
0 commit comments