Repository navigation
Replies: 1 comment 2 replies
As I wrote in response to your earlier discussion post #4909, Leptos already does support a server-first style with smaller WASM, through the islands and islands-router features. If the question is "Does Leptos plan to directly support the combination Loco + HTMX + Alpine + Leptos?" Then the answer is "No." |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
To me, Leptos is the best Rust full-stack framework, a Swiss Army knife. You can use all of it, or only some parts if you want a small frontend bundle. One language from server to browser, and the compiler checks it all, end to end. For bigger projects I combine it with other tools, each doing what it's good at, so the app stays fast everywhere.
Leptos renders every page on the server, and islands do the heavy browser work as wasm. htmx and Alpine attributes go straight into Leptos's
view!: htmx swaps pages, and Alpine handles small UI state. Under a strict CSP, Alpine can't reach browser APIs like haptics, so those go to an island. Big islands that few pages use load lazily, with#[island(lazy)], as a separate wasm file. No hand-written JavaScript for interactivity, except a 30-line glue script between htmx and the islands.The project starts with
cargo loco new, and Leptos replaces Loco's default template engine insrc/views. Loco handles the server, with batteries included: auth, mail, jobs and the database. SQLx'squery!macro checks the SQL at compile time.The outcome: smaller wasm files on heavy, SaaS-like apps. Leptos does the parts nothing else can, and it plays well with tools that do the rest.
Is a server-first style like this, with smaller wasm, something Leptos plans to support more directly?
All reactions