Skip to content

Example/starter: Rust/UI on Cloudflare Workers with SSR + hydration (SEO) and a Tauri webview build #55

Description

@joeblew999

Thanks for Rust/UI. The copy-paste model and the Tauri starters are great. I'd like to request an official example (or starter repo) for a deployment shape I think is common.

The need

  • One Leptos codebase using Rust/UI components
  • Server-side rendered on Cloudflare Workers, so crawlers like Googlebot receive complete HTML and the site indexes properly
  • Hydrated in the browser afterwards
  • The same frontend packaged as a Tauri webview app (desktop/mobile)

Many people need an app and good search indexing at the same time. The current starters cover the Tauri side but assume a conventional server (Docker/nginx) for SSR.

Suggested base

rogu3bear/leptos-cloudflare is a single-crate Leptos template for Workers with SSR, hydration, Workers Static Assets and D1-backed server functions. The official workers-rs Leptos template is the other candidate.

What the example would ideally show

  1. A handful of Rust/UI components (Button, Dialog, a form, something using JS interop) rendering under SSR on wasm32-unknown-unknown and hydrating without mismatch warnings
  2. Tailwind build output and tw-merge / icons working with Workers Static Assets
  3. ui-cli adding components into that project layout
  4. Which components, if any, are client-only and how to gate them
  5. SEO basics via leptos_meta: per-route title/description, canonical, and a check that curl returns full HTML
  6. How the Tauri build relates: CSR-only bundle vs. pointing at the deployed Worker, and what that means for server functions
  7. Any Worker bundle-size notes

Acceptance check

wrangler dev serves a page where view-source shows the rendered component markup, hydration completes cleanly, and the same components build in the Tauri starter.

Happy to test it and report back.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions