frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Reinhardt – Django-style Rust framework; WASM+SSR from one DSL

https://github.com/kent8192/reinhardt-web
2•kent8192•1h ago
Reinhardt is a Rust web framework where one component DSL compiles to both WASM (client) and server-rendered HTML — a single file describes both sides of a page, with no separate frontend codebase, no JS build toolchain, and no duplicated types across the client/server boundary.

It also bundles what Django/DRF users expect: an ORM with auto-generated migrations from #[model] macros, DI, auth, admin, REST, background tasks, and i18n. Feature flags let you pull in just what you need (minimal / standard / full), or import individual crates directly.

I built it after moving from Django/DRF to Rust and repeatedly re-assembling the same Axum + ORM + migrations + auth stack for every project.

Quickstart: https://reinhardt-web.dev/quickstart/

v0.1.0-rc.18 release: <https://github.com/kent8192/reinhardt-web/releases/tag/reinh...>

Crates.io (published as reinhardt-web; the shorter name was taken): https://crates.io/crates/reinhardt-web

BSD 3-Clause.

Comments

kent8192•1h ago
Author here. The novel piece is the Pages compiler (Manouche — named after the Django Reinhardt jazz genre): page!, head!, and form! macros go through TokenStream → AST → validation → IR → codegen and emit both client WASM and server SSR code from the same source. A #[server_fn] is callable from client components but compiles to a server-only function with full DI access:

  use reinhardt::DatabaseConnection;
  use reinhardt::db::orm::Model;
  use reinhardt::pages::server_fn::{ServerFnError, server_fn};

  #[server_fn]
  async fn list_active_users(#[inject] db: DatabaseConnection) -> Result<Vec<User>, ServerFnError> {
      User::objects()
          .filter_by(User::field_is_active().eq(true))
          .all_with_db(&db)
          .await
          .map_err(|e| ServerFnError::application(format!("DB error: {e}")))
  }
The same file holds the client component that calls it — list_active_users is invoked as an ordinary async Rust function; on WASM the macro rewrites it into a typed RPC call:

  use reinhardt::pages::component::Page;
  use reinhardt::pages::page;
  use reinhardt::pages::reactive::hooks::{Action, use_action};

  pub fn active_users_view() -> Page {
      // use_action works uniformly on native (SSR) and WASM; on native the future
      // is dropped after a synchronous Idle→Pending→Idle cycle, so SSR renders the
      // empty shell that WASM later hydrates and populates.
      let load =
          use_action(|_: ()| async move { list_active_users().await.map_err(|e| e.to_string()) });
      load.dispatch(());

      page!(|load: Action<Vec<User>, String>| {
          div {
              watch {
                  if load.is_pending() {
                      p { "Loading..." }
                  } else if let Some(err) = load.error() {
                      p { { err } }
                  } else {
                      ul {
                          { Page::Fragment(
                              load.result().unwrap_or_default().iter()
                                  .map(|u| page!(|name: String| li { { name } })(u.username.clone()))
                                  .collect::<Vec<_>>()
                          ) }
                      }
                  }
              }
          }
      })(load)
  }
No OpenAPI schema, no hand-rolled fetch, no duplicated request/response types between client and server. The #[server_fn] macro generates the RPC endpoint + JSON codec on the server, a typed async stub on the client, and hydration markers so SSR-rendered HTML stays consistent after WASM takes over.

Website: https://reinhardt-web.dev

docs.rs: https://docs.rs/crate/reinhardt-web/latest

China Makes an Island

https://www.nytimes.com/interactive/2026/04/22/world/asia/south-china-sea-island.html
1•tcp_handshaker•1m ago•0 comments

An AI‑enabled device code phishing campaign

https://www.microsoft.com/en-us/security/blog/2026/04/06/ai-enabled-device-code-phishing-campaign...
1•mooreds•2m ago•0 comments

AI Index Report

https://hai.stanford.edu/ai-index/2026-ai-index-report
1•mmaia•2m ago•0 comments

Inside Prime Video

https://insidetechandmedia.substack.com/p/inside-launching-ads-on-prime-video
1•NeedMoreCowbell•3m ago•0 comments

How I've Actually Been Using AI

https://www.indiehackers.com/post/how-ive-actually-been-using-ai-39109e2c59
1•TimLeland•3m ago•0 comments

Ask HN: How are you handling domain registration in agentic workflows?

1•AgentNews•3m ago•0 comments

Built a tool to turn any data into dashboards instantly – looking for feedback

1•dashbee•3m ago•0 comments

The PR you would have opened yourself

https://huggingface.co/blog/transformers-to-mlx
1•gmays•4m ago•0 comments

The Foreman Problem: Managing Teams When Your Best Worker Isn't Human

https://businessasusual.io/p/the-foreman-problem-managing-teams
1•mooreds•6m ago•0 comments

DNS reconnaissance and what it reveals about domains

https://www.whoisxmlapi.com/blog/dns-reconnaissance
1•mennylevinski•8m ago•0 comments

Welcome to Google Cloud Next '26

https://cloud.google.com/blog/topics/google-cloud-next/welcome-to-google-cloud-next26
1•Nic0•9m ago•0 comments

Design is not a moat. It's a generous gift

https://metedata.substack.com/p/008-design-is-a-generous-gift
1•young_mete•9m ago•0 comments

Delta Battlefield Management System

https://en.wikipedia.org/wiki/Delta_(situational_awareness_system)
1•e12e•15m ago•1 comments

Monkey Linux (1997)

https://jenda.hrach.eu/f2/monkeylinux/english.htm
2•alfiedotwtf•17m ago•1 comments

Lufthansa cuts 20k summer flights as fuel prices surge

https://www.bbc.co.uk/news/articles/cre1r4n5j5wo
2•vinni2•19m ago•0 comments

Geoviz JavaScript Library

https://riatelab.github.io/geoviz/
3•mariuz•23m ago•0 comments

Anthropic tests how devs react to yanking Claude Code from Pro plan

https://www.theregister.com/2026/04/22/anthropic_removes_claude_code_pro/
1•marcofloriano•24m ago•1 comments

Smile v6.0 Was Released

https://github.com/haifengl/smile
1•pdsminer•25m ago•1 comments

Iliad fragment found in Roman-era mummy

https://www.thehistoryblog.com/archives/75877
1•wise_blood•25m ago•0 comments

How to Open Source and Not Starve

https://hajo.me/blog/2026/04/22/how-to-open-source-and-not-starve/
2•fxtentacle•27m ago•1 comments

The handmade beauty of Machine Age data visualizations

https://resobscura.substack.com/p/the-handmade-beauty-of-machine-age
1•benbreen•28m ago•0 comments

You lose words on the tip of your tongue (2020)

https://www.bbc.com/future/article/20201125-on-the-tip-of-your-tongue-is-it-a-sign-of-a-bad-memory
1•stephen-hill•28m ago•1 comments

Reverse-engineering a supply chain attack delivered via fake Web3 job interview

https://www.reymom.xyz/blog/security/2026-04-15-supply-chain-attack
1•reymon-dev•28m ago•2 comments

Everything I know about floppy disks (2023)

https://thejpster.org.uk/blog/blog-2023-08-28/
1•stephen-hill•29m ago•0 comments

Build It Yourself (2025)

https://lucumr.pocoo.org/2025/1/24/build-it-yourself/
2•stephen-hill•29m ago•0 comments

AI fact-checker with guardrail classifier and MCP server

https://fact-check-analyzer.vercel.app/
1•amahadeven•30m ago•1 comments

How Skopx Learns Your Business While You Work

https://skopx.com/resources/live-platform-business-context
1•skopx•31m ago•0 comments

Open Benchmark: Text Normalization in Commercial Streaming TTS Models

https://async-vocie-ai-text-to-speech-normalization-benchmark.static.hf.space/index.html
1•baghdasaryana•31m ago•0 comments

Push Notifications Can Betray Your Privacy (and What to Do About It)

https://www.eff.org/deeplinks/2026/04/how-push-notifications-can-betray-your-privacy-and-what-do-...
1•u1hcw9nx•33m ago•0 comments

Don't read the PDF, write the parser

https://adriacidre.com/blog/self-healing-parsers-instead-of-vision/
2•kumulo•34m ago•1 comments