Create Rust AppSet up a modern rust+react web app by running one command. Join us on discord.
diesel_clidiesel_cli with your system's libsqlite3, you may run cargo install diesel_cli --no-default-features --features sqlite-bundled.cargo install create-rust-app_cli
create-rust-app my-todo-app
# .. select backend framework, plugins, etc.
# Code-gen resources for your project
cd ./my-todo-app
create-rust-app
# .. select resource type / properties
create-rust-app create <project_name>
cargo fullstackactix-webpoem (support temporarily on hold, use version 9.2.2: cargo install create-rust-app_cli@9.2.2)cargo dsync in your project (see codegen section below)./views folder contains all templates/frontend/bundles folder contains all the bundles which can be included in your views via {{bundle(name="MyBundle.tsx")}}create_rust_app::render_single_page_application("/app","your_spa.html") (if you're using Poem, the parameters are slightly different, an example is provided in the function's documentation)cargo tsync in your project folder; see codegen section below)react-router-dom)react-query hooks generation ($ cd my_project && create-rust-app, then select "Generate react-query hooks")Authentication (+ Authorization) plugin
Add JWT token-based auth with a simple command
Auth guardRBAC permissions out of the box (assign roles and permissions to users)
Social authentication (OIDC) plugin
Adds Oauth2-based authentication (requires auth plugin)
rust
app.app_data(Data::new(AuthConfig {
oidc_providers: vec![GOOGLE(
"client_id",
"client_secret",
"/success/redirect",
"/error/redirect",
)],
}))
Then, redirect your users to start the flow!
jsx
<a href={"/api/auth/google"}>Login with Google</a>
Container plugin
Dockerfile to containerize your rust app into a single image
Development plugin
View your database via the admin portal at localhost:3000/admin (still in development)
Storage plugin
Adds Storage extractor which allows you to upload/download files from an S3-compatible object store
Attachment::*!Here are some examples:
rust
let s3_key = Attachment::attach("avatar", "users", user_id, AttachmentData {
file_name: "image.png",
data: bytes
})?;
rust
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
Adds all the boilerplate necessary to expose GraphQL
Find a graphql playground at localhost:3000/graphql
Utoipa plugin
Uses the utoipa crate to add OpenAPI documentation and serve it in a SwaggerUI playground.
http://localhost:3000/swagger-ui/Has a soft dependency on the Auth plugin
Tasks Plugin
fang under the hood and all it's features are exposed.create_rust_app::tasks::queue()Run the queue with cargo run --bin tasks
Workspace Support (Enabled by default, not tied to a feature flag)
CRA_MANIFEST_PATH: default ./frontend/dist/manifest.json when called from workspace root, ../frontend/dist/manifest.json otherwise.CRA_FRONTEND_DIR: default ./frontend when called from workspace root, ../frontend otherwise.CRA_VIEWS_GLOB: default backend/views/\*\*/\*.html when called from workspace root, views/\*\*/\*.html otherwise.cargo dsync
backend/models folder!cargo tsync
#[tsync::tsync]. You'll find the output for this command here: frontend/src/types/rust.d.ts.cd my_project && create-rust-app
/api!react-query hooks generation for frontendservices/ folderQuestions and comments are welcome in the issues section!
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).
Moreover, you can try using the mold linker which may also improve compilation times.
$ claude mcp add create-rust-app \
-- python -m otcore.mcp_server <graph>