Cot is an easy to use, modern, and fast web framework for Rust. It has been designed to be familiar if you've ever used Django, and easy to learn if you haven't. It's a batteries-included framework built on top of axum.
- Easy to use API — in many ways modeled after Django, Cot's API is designed to be easy to use and intuitive. Sensible defaults make it for easy rapid development, while the API is still empowering you when needed. The documentation is a first-class citizen in Cot, making it easy to find what you're looking for.
- ORM integration — Cot comes with its own ORM, allowing you to interact with your database in a way that feels Rusty and intuitive. Rust types are the source of truth, and the ORM takes care of translating them to and from the database, as well as creating the migrations automatically.
- Type safe — wherever possible, Cot uses Rust's type system to prevent common mistakes and bugs. Not only views are taking advantage of the Rust's type system, but also the ORM, the admin panel, and even the templates. All that to catch errors as early as possible.
- Admin panel — Cot comes with an admin panel out of the box, allowing you to manage your app's data with ease. Adding new models to the admin panel is stupidly simple, making it a great tool not only for rapid development and debugging, but with its customization options, also for production use.
- Secure by default — security should be opt-out, not opt-in. Cot takes care of making your web apps secure by default, defending it against common modern web vulnerabilities. You can focus on building your app, not securing it.
To get started with Cot, you need to have Rust installed. If you don't have it yet, you can install it by following the instructions on the official Rust website.
Then, you need to install cot-cli by running:
cargo install cot-cliAfter that, you can create a new project by running:
cot new my_projectThis will create a new project in the my_project directory. You can then navigate to the project directory and run
the following command to start the development server:
cargo runWe recommend you to read the official guide to learn more about Cot and how to use it.
Got interested or have questions? Join our Discord server — we'd love to hear from you!
If you prefer to use your operating system's package manager to manage the cot-cli package, you can find it in the
repositories listed in the “Packaging status” badge on the right. Note that most of these packages are maintained by
the community, so you should always check what exactly is included in the package. Moreover, the version in the package
manager might not be the latest one, so we recommend just using the official package which can be installed with
cargo install cot-cli.
If you want to contribute to Cot, please read the contributing guide. It will guide you through the process of setting up your development environment and making contributions.
Thanks in advance for your contributions — every contribution is appreciated!
The guide served at the official website is built from the Markdown files located in the docs directory. See the docs/README.md file for more information about the guide and how to build the website locally.
Cot is an independent, open-source project. If you find it useful, please consider sponsoring its development — your support helps us dedicate more time to building and maintaining the framework.
A huge thank you to all our existing sponsors — your generosity makes this project possible!
Made with contrib.rocks.
Cot is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or https://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Cot by you shall be dual licensed under the MIT License and Apache License, Version 2.0, without any additional terms or conditions.