demo/: Compose Desktop sample app (demo/src/jvmMain/kotlin/...).wrywebview/: native WebView core.- Rust crate:
wrywebview/Cargo.tomlwith sources inwrywebview/src/main/rust/(wry + UniFFI). - JVM glue:
wrywebview/src/main/kotlin/+wrywebview/src/main/java/(JNA/Skiko interop).
- Rust crate:
wrywebview-compose/: Compose wrapper exposingio.github.kdroidfilter.webview.*(WebView,WebViewState,WebViewNavigator).- Shared API/types:
wrywebview-compose/src/commonMain/kotlin/.... - Platform actuals:
.../src/jvmMain/(Wry),.../src/androidMain/(Android WebView),.../src/iosMain/(WKWebView + cinterop in.../src/nativeInterop/).
- Shared API/types:
- Generated/build outputs live under
*/build/andwrywebview/target/(don’t edit or commit).
./gradlew build: builds all modules (Kotlin + Rust via Gobley/UniFFI); requires a working Rust toolchain../gradlew :demo:run: runs the desktop demo app../gradlew :wrywebview:build: rebuilds the native core and refreshes generated bindings../gradlew :wrywebview-compose:compileDebugKotlinAndroid: compiles the Android implementation (requires Android SDK)../gradlew clean: removes Gradle build outputs (useful when native artifacts get out of sync).
- Kotlin/Compose: 4-space indentation, idiomatic Kotlin style,
camelCasefor values/functions,PascalCasefor types and@Composablefunctions (e.g.,WebView). - Keep public API changes small and documented (README usage snippets should stay accurate).
- Rust: format with
cargo fmtinwrywebview/; keep the#[uniffi::export]surface stable and cross-platform.
- Kotlin tests (when added) should live in
*/src/jvmTest/kotlin(orcommonTest) and run with./gradlew test. - Rust tests (when added) can run via
cd wrywebview && cargo test.
- Commit messages follow a simple imperative style (e.g., “Add …”, “Fix …”, “Refactor …”) and mention the affected module/API when helpful.
- PRs should include: a short rationale, steps to verify (
./gradlew :demo:run), OS tested (Linux/macOS/Windows), and screenshots/GIFs for UI changes.
- The demo/app JVM needs
--enable-native-access=ALL-UNNAMED(JNA); keep this in sync withREADME.md. - Platform builds may require system deps (notably GTK/WebKit on Linux); call out any new requirements in the PR description.