Set up a modern rust+react web app by running one command.
tsync
cargo install tsync
yarn
npm i -g yarn
rustup install stable
(nightly is fine too)sh
cargo install create-rust-app_cli
```sh create-rust-app my-todo-app
```
```sh
cd ./my-todo-app create-rust-app
```
$ create-rust-app <project_name>
cargo fullstack
actix-web
, poem
or let us know which one you want to use!tsync
)react-router-dom
)react-query
hooks generation ($ cd my_project && create-rust-app
, then select "Generate react-query hooks")create-react-app
)Available Plugins
Authentication (+ Authorization) plugin
Auth
guardContainer plugin
Admin Portal plugin
Storage plugin
Storage
extractor which allows you to upload/download files from an S3-compatible object store Attachment::*
!rs
let s3_key = Attachment::attach("avatar", "users", user_id, AttachmentData {
file_name: "image.png",
data: bytes
})?;
rs
let storage: Storage // retreive this via the appropriate extractor in your frameowrk of choice
let url = storage.download_uri(s3_key)?;
(note: see Attachment::*
and Storage::*
for more functionality!)GraphQL plugin
localhost:8080/graphql
$ cd my_project && create-rust-app
- CRUD code-gen to reduce boilerplate
- Scaffolds the db model, endpoints service file, and hooks it up in your /api
!
- react-query
hooks generation for frontend
- Generates a hook for each handler function defined in the services/
folder
- Edit generated hooks afterwards -- they won't be regenerated unless you delete (or rename) the hook!
If you're experiencing slow compilation time, make sure there isn't any bloat in the template files (look for node_modules
or typescript / parcel caches and delete them).