Skip to documentation
Rust

Framework guides

Rust

Create a minimal Cargo application.

On this page

Choose your starting point

Before you start

Node.js 20.19 or newer to run Forjex, plus a stable Rust toolchain with Cargo.

Create your project from a folder where you keep your work. Forjex creates a new subfolder and refuses to overwrite an existing one. No GitHub or Vercel account is required to create and run the starter.

Create your Rust project

1

Generate the starter

Run this command from your terminal. It downloads and runs the Forjex CLI.

pnpm dlx forjex create my-rust-app --template rust

Forjex creates the files. Install the language tools listed above, then follow the commands in the next step.

The package-manager buttons select how you run Forjex. Node starter dependencies are installed with npm by the CLI. After creation, interactive mode offers to continue into GitHub, optional CI/CD, and deployment. Choose No or use --no-setup to finish locally.

2

Run your application

cd my-rust-app
cargo run

Cargo builds and runs the application. Its greeting appears in your terminal; this starter does not run a web server.

3

Make your first change

Edit src/main.rs. Run the application again to see your changes.

Use the entry point and test starter as a starting point for your own application.

4

Run the checks

cargo test
cargo build --release

Run this before sharing your work. A successful local build or test does not deploy the application.

What gets created

  • Cargo manifest and Rust 2021 application
  • A main function with a Forjex greeting
  • An initial unit test
  • No web framework or third-party dependencies
Project structure
├── src/
│   └── main.rs
├── .gitignore
├── Cargo.toml
└── README.md

This is the complete default local file tree before installing dependencies. It includes the README and a language-specific .gitignore. This is a minimal Rust application, not an Axum service.

Already have a project?

Skip the create command. Open your existing Rust project folder and run:

npx forjex forge

Choose Use the existing project in this directory. The CLI uses your local application files for repository setup; it does not replace them with a starter. Review existing workflows and configuration before enabling generation.

Follow the existing-project guide →

Connect GitHub and ship

Creation offers to continue into GitHub, optional CI/CD, and deployment. To continue later, run npx forjex forge from the generated project folder and choose the existing-project path. You can create a GitHub repository, add CI/CD, and push your code.

Use a host that supports your language and runtime. These backend starters do not include a Vercel deployment setup.

Prefer a visual setup? The browser wizard also offers this framework.