You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Generated/build outputs live under `*/build/` and `wrywebview/target/` (don’t edit or commit).
13
+
14
+
## Build, Test, and Development Commands
15
+
16
+
-`./gradlew build`: builds all modules (Kotlin + Rust via Gobley/UniFFI); requires a working Rust toolchain.
17
+
-`./gradlew :demo:run`: runs the desktop demo app.
18
+
-`./gradlew :wrywebview:build`: rebuilds the native core and refreshes generated bindings.
19
+
-`./gradlew :wrywebview-compose:compileDebugKotlinAndroid`: compiles the Android implementation (requires Android SDK).
20
+
-`./gradlew clean`: removes Gradle build outputs (useful when native artifacts get out of sync).
21
+
22
+
## Coding Style & Naming Conventions
23
+
24
+
- Kotlin/Compose: 4-space indentation, idiomatic Kotlin style, `camelCase` for values/functions, `PascalCase` for types and `@Composable` functions (e.g., `WebView`).
25
+
- Keep public API changes small and documented (README usage snippets should stay accurate).
26
+
- Rust: format with `cargo fmt` in `wrywebview/`; keep the `#[uniffi::export]` surface stable and cross-platform.
27
+
28
+
## Testing Guidelines
29
+
30
+
- Kotlin tests (when added) should live in `*/src/jvmTest/kotlin` (or `commonTest`) and run with `./gradlew test`.
31
+
- Rust tests (when added) can run via `cd wrywebview && cargo test`.
32
+
33
+
## Commit & Pull Request Guidelines
34
+
35
+
- Commit messages follow a simple imperative style (e.g., “Add …”, “Fix …”, “Refactor …”) and mention the affected module/API when helpful.
36
+
- PRs should include: a short rationale, steps to verify (`./gradlew :demo:run`), OS tested (Linux/macOS/Windows), and screenshots/GIFs for UI changes.
37
+
38
+
## Security & Configuration Tips
39
+
40
+
- The demo/app JVM needs `--enable-native-access=ALL-UNNAMED` (JNA); keep this in sync with `README.md`.
41
+
- Platform builds may require system deps (notably GTK/WebKit on Linux); call out any new requirements in the PR description.
Copy file name to clipboardExpand all lines: README.md
+22-15Lines changed: 22 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,20 @@
1
1
# ComposeWebview
2
2
3
-
Wry-powered **WebView for Compose Desktop (Kotlin/JVM)**, backed by a small Rust core (wry) exposed via **Gobley/UniFFI**.
3
+
Compose Multiplatform **WebView** with a **KevinnZou/compose-webview-multiplatform-inspired API** under `io.github.kdroidfilter.webview.*`.
4
4
5
-
This repository exposes a **KevinnZou/compose-webview-multiplatform-inspired API** under `io.github.kdroidfilter.webview.*` so you can keep the same mental model (`WebView`, `WebViewState`, `WebViewNavigator`, cookies, JS bridge) while using a desktop backend.
5
+
- Desktop: **Wry** backend (Rust core via **Gobley/UniFFI**)
6
+
- Android: `android.webkit.WebView`
7
+
- iOS: `WKWebView`
6
8
7
9
## Demo
8
10
9
-
Run the showcase app (recommended first):
11
+
This repo ships a feature showcase app (recommended first):
0 commit comments