Is there any project similar in Rust as create react app?

Hi all!

Context

  1. I'm new to the Rust language and I was wondering if there is Rust language support in creating web apps
  2. What is Create React App?
    Create React App (CRA) is a tool to create single-page React applications that is officially supported by the React team . The script generates the required files and folders to start the React application and run it on the browser
  3. Is there any project like create react app in Rust?

I don't know what are your expectations, but Cargo is probably what you are looking for:

https://doc.rust-lang.org/cargo/commands/cargo-new.html

1 Like

For client-side code there are some frameworks, like:

but client-side code of web apps isn't Rust's strong point. On client side you may be better off using an existing JS framework for the UI, and call computation-heavy functions in Rust compiled to WASM.

For server-side Rust and other options see:

1 Like

Rust doesn't really create web apps. You can use Rust in a web app using rust-wasm, but that's putting Rust inside JavaScript, by itself it can't talk to the DOM (yet ...). Without that, the overhead is too high for there to be much point trying to drive the UI from Rust, at least the normal way such things work (but Yew looks neat!)

Generally, just write your UI in JavaScript like usual, and if you want, put the backend logic in Rust with WASM: see Writing Redux Reducers in Rust | Fiberplane

(Also please don't use CRA anymore, it's completely outdated and broken at this point. Use Vite, NX, anything else, really)

You probably want to have a look at create-rust-app:

It's very similar to create-react-app as it's a scaffolding cli tool that sets up the following (according to their README):

  • Rust backend
    • actix-web or poem as the backend framework
    • PostgreSQL
    • Vite
    • ...
  • React Frontend (but you can also provide your own framework)

You also have the ability to add plugins like JWT auth and much more.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.