Better HN
topnewbestaskshowjobs
Log inSign up

kent8192

5 karma · joined Mar 29, 2026 (8mo ago) · 22 submissions

Building Reinhardt, a Django/DRF-inspired full-stack web framework for Rust. Interested in web frameworks, DX, and type-safe tooling. I'm not a native English speaker, so my English may sometimes be incorrect. Github: https://github.com/kent8192
Submissions

comment 7mo ago · link · parent

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

2.

Show HN: Reinhardt – Django-style Rust framework; WASM+SSR from one DSL(github.com ↗)

2 points · by kent8192 · 7mo ago · 1 comment

comment 7mo ago · link · parent

Currently, v0.1.0-rc.15, WASM frontend is not fully debugged. I recommend using only RESTful API for the try.

4.

Show HN: Reinhardt – Django/DRF-inspired full-stack web framework for Rust(reinhardt-web.dev ↗)

2 points · by kent8192 · 7mo ago · 1 comment

comment 7mo ago · link · parent

Oh, boy. This good tool hates my LM Studio... The following message appears when I run Bonsai in my LM Studio. I think my settings have done something wrong. ``` Failed to load the model Error loading model. (Exit code: null). Please check the settings and try loading the model again. ```

comment 8mo ago · link · parent

Feature suggestion: For the VSCode extension, could it open multiple Agent Flow in one pane in parallel? I always use Claude Code via Zellij, a terminal multiplexer. So, I want this tool to show multiple sessions in a single window. Please consider it. Best effort.

comment 8mo ago · link · parent

Great job! I successfully and easily introduced your tool to my CC via VSCode. Beautiful visualisation is what I'd been exploring for a long time, and response time is fast enough for me. Displaying Japanese is as clear as other languages. Thank you for your effort!

comment 8mo ago · link · parent

It's pretty good for me, and I applied it to my project! I want to connect this tool to my Claude Code via an MCP or a plugin. Could I do that as though it were Deepwiki?

comment 8mo ago · link · parent

Thank you for your effort and apologise for confusing you. English is my second language, so it might not be clear to native speakers. Thank you for adding the unit type to those endpoints! I'll enjoy your tool!

comment 8mo ago · link · parent

Good challenge! The growing size of a model is a big problem for any project. However, I feel there are some issues with your hypothesis. I'm not a professional in machine learning, so pardon me if I ask questions that aren't related to the topic. You hypothesise that, with a pre-defined filter, we can introduce stronger inductive bias, simply speaking. However, I'm not sure how to choose the best filter for my project. Introducing an inductive bias at an earlier stage of the learning model is a good way to enhance accuracy, provided everyone can choose the best filter for their own project.

comment 8mo ago · link · parent

Thank you for your prompt effort to fix the bug. I'd be able to install your tool and enjoy that. If I find the bug in the future, I will report it on your Discord. Best regards!

comment 8mo ago · link · parent

It's good for me, so I've installed it for my Mac by the option below in your link. However, it returns just error. I think because the link: `gitwhy.dev/install` returns 404 page. So, you should check your way to install your own tool. It's a good challenge. Best effort!

comment 8mo ago · link · parent

I think it can be one option to achieve a tiny goal. Some companies often think that using AWS or GCP is too much of a stretch for a minimum target. So, it can be a good way to meet their request.

comment 8mo ago · link · parent

This is interesting! However, can't it switch the unit to meters, not miles? From the link you provided, it appears the API doesn't include information about its unit in the responses. So, it's confusing.