Remix.run Logo
satvikpendem 3 hours ago

Is this like ReasonML and its React-Reason framework?

I don't really understand how it works, what part is Rust powered, is it reimplementing the JS engine in Rust?

skiniks 3 hours ago | parent | next [-]

Not like ReasonML, you still write normal React/TypeScript.

The Rust part is the server runtime. Instead of Node.js running your React Server Components, rari uses a Rust server with an embedded V8 engine. Same React code, different server underneath.

You write React → Rust server executes it → better performance than Node-based alternatives.

mpeg 2 hours ago | parent | next [-]

wait so it actually has a rust runtime? that's not documented in the site so I had assumed the rust part was simply rolldown

it would be interesting to see a performance comparison to node and bun

Erenay09 2 hours ago | parent [-]

I can only found this benchmarks

https://github.com/rari-build/benchmarks

mpeg 2 hours ago | parent [-]

interesting, but would certainly be good to see an apples to apples benchmark of rari vs node/deno/bun for the same app, I would imagine the goals of the runtime are not to be a general runtime like those others, but it would still be good to see if it performs better

laurencerowe 2 hours ago | parent | prev [-]

How is this different than running that same React code in deno whose HTTP server is also written in Rust?

skiniks 2 hours ago | parent [-]

The main difference is that Deno doesn't have React Server Components support. You'd need to build the entire RSC runtime yourself (streaming, Suspense boundaries, server actions, etc.), whereas rari has this built in and optimized. rari also uses Axum for the HTTP layer with opinionated defaults for RSC workloads: streaming responses, proper cache headers, and optimized middleware are all configured out of the box.

While we use Deno's excellent crates (deno_core for V8 bindings, we're big fans of the project!), you're not locked into the Deno ecosystem. rari uses standard node_modules resolution, so your existing Node/npm workflows just work. Think of it like this: Deno gives you a runtime to build on, while rari gives you the full stack with integrated bundler, router, HMR, and dev server all configured to work together for RSC apps.

moritzwarhier 21 minutes ago | parent [-]

Stuff like this makes RSC sound interesting again (as a developer who often uses React but rarely touched SSR).

Keep up the good work! Might be hard to keep up with future React updates, but I hope it won't be too hard. React itself has been relatively stable among the 16+ version lines I think.

bsimpson 3 hours ago | parent | prev [-]

I forgot all about Reason…

moritzwarhier 16 minutes ago | parent [-]

I once (2022 I think) took a short ReasonML course with hands-on and while it was only superficial, I remember how much it increased the appeal of pattern matching and immutability for me... without being a true FP head or anything.