leptos-webview

Status: Coming. Proof of concept done.

What

Run a Leptos-powered WebView from Swift/Kotlin.

  • Create a client-side rendered Leptos app.
  • Implement any server-side APIs so that they can be packaged into a library.
  • Package the app (generated website) and the library using the mobile package crates into a Swift Package and an Android .aar archive including the resources so that it is completely standalone.
  • Auto-generate the Swift and Kotlin code needed to launch the WebView and to bridge the WebView to the Rust library. Uses UniFFI.
  • Create the WebView from within your mobile app directly from Kotlin/Swift.

Why

Develop all the platform-independent parts in Rust & Leptos but keep the full power of Xcode/Swift and Android/Kotlin for the platform specific parts.

  • By creating the WebView from within your mobile app using Kotlin/Swift you can decide if all your app should be fully Leptos based or only parts of it.
  • Since you are in the native code, it's easy to integrate with native features.
  • You create your projects using Xcode and Android Studio and you have the full power of those environments and the complete set of configuration options.
  • You use standard Swift Packages and Android aar archives.