How this site is built
A short technical breakdown of vancoola.dev — stack, choices, trade-offs.
Stack
Built in Rust with Leptos as the framework. Server-side rendered via Axum, hydrated to interactive WASM in the browser. The same Rust code runs on both sides — no separate frontend language.
Why Leptos
Leptos offers a unique paradigm for full-stack Rust development. By utilizing fine-grained reactivity (signals) instead of a Virtual DOM, it achieves exceptional performance and minimal hydration overhead. When the server sends HTML, it only needs to attach event listeners and establish signal connections, rather than rebuilding a heavy component tree in the browser.
I chose this over alternatives like Yew, Next.js, or Astro primarily for the single-language developer experience. Sharing types, validation logic, and models between the Axum backend and the frontend WASM client eliminates an entire category of serialization bugs. While Astro is fantastic for content sites, Leptos provides a more cohesive path when building highly interactive, state-heavy applications.
Architecture
Browser -> HTTP request -> Axum router | +-> (Static assets to CDN) | +-> (Route handler -> Leptos SSR -> HTML response -> Browser hydrates to reactive WASM client)
Same Rust types flow through every layer. Server-rendered HTML is interactive within ~700ms on mid-tier mobile.
Performance
*Methodology: Measured via Chrome DevTools (Throttled Fast 3G, 4x CPU slowdown) on an incognito window. The WASM payload is Brotli compressed at the edge.
Trade-offs I accept
WASM bundle is heavier than vanilla JS. While Leptos is highly optimized, shipping a WebAssembly runtime and compiled Rust logic fundamentally requires more bytes over the wire than a minimal vanilla JS setup for simple interactions.
Build pipeline is slower. Compiling Rust to WASM (especially release builds with `wasm-opt`) takes significantly longer than modern JS bundlers like Vite or esbuild. Hot Module Replacement (HMR) exists but isn't as instantaneous.
Smaller ecosystem. The Rust web ecosystem is growing rapidly, but it doesn't compare to npm. You often have to write your own bindings for browser APIs or build UI components from scratch rather than reaching for a pre-built library.
If the site was purely static content with zero interactivity, Astro or raw HTML/CSS would be the objectively better tool.