Sign in

Cot.rs

@cot.rs
27 followers 5 following 28 posts

The Rust web framework for lazy developers

PostsRepliesMedia
Cot.rs @cot.rs · 13/07/2026
Join our Discord to share your thoughts on Cot and chat with the community! discord.cot.rs
discord.cot.rs
Join the Cot.rs Discord Server!
A community for Rust web development focused around Cot.rs framework | 98 members
000
Cot.rs @cot.rs · 13/07/2026
If that piques your interest, you can read about the rest of the features on @mackow.ski blog post! mackow.ski/blog/cot-v07...
mackow.ski
Cot v0.7: Lazily Thorough | Blog | Mateusz Maćkowski
100
Cot.rs @cot.rs · 13/07/2026
ProjectConfig now has a catch-all extra field that captures any configuration keys Cot doesn’t recognise. This is the idiomatic way to add project-specific settings to the standard config TOML files without fighting the parser.
# config/base.toml
[my_app]
analytics_key = "UA-XXXXXXXXX-1"
feature_flags = ["dark_mode", "beta_ui"]

use cot::config::ProjectConfig;
use serde::Deserialize;

#[derive(Deserialize)]
struct MyAppConfig {
    analytics_key: String,
    feature_flags: Vec<String>,
}

async fn handler(config: ProjectConfig) -> cot::Result<Html> {
    let app_config: MyAppConfig = config
        .extra
        .get("my_app")
        .expect("missing [my_app] section")
        .clone()
        .try_into()?;

    // ...
}
100
Cot.rs @cot.rs · 13/07/2026
Foreign key fields now let you control referential integrity policies directly from the model definition. Previously, Cot always generated RESTRICT for both policies. Now you can choose any standard option giving you full control over what happens when a referenced row is updated or deleted.
use cot::db::{ForeignKey, ForeignKeyOnDeletePolicy, ForeignKeyOnUpdatePolicy};

#[model]
struct Comment {
    #[model(primary_key)]
    id: Auto<i32>,

    #[model(
        on_delete = ForeignKeyOnDeletePolicy::Cascade,
        on_update = ForeignKeyOnUpdatePolicy::Cascade,
    )]
    post: ForeignKey<Post>,

    body: String,
}
110
Cot.rs @cot.rs · 13/07/2026
Forms are central to almost every web app, and in v0.7 we’ve made Cot’s form system more expressive. All the major field types: String, Password, Email, Url, number, and float fields, now expose a much larger set of HTML attributes that you can configure through field options
use cot::form::fields::{AutoComplete, List, StringFieldOptions};

#[derive(Form)]
struct ProfileForm {
    #[form(opts(
        max_length = 100,
        placeholder = "Your full name",
        autocomplete = AutoComplete::Name,
        list = List::new(["Alice", "Bob", "Charlie"]),
    ))]
    name: String,

    #[form(opts(
        placeholder = "you@example.com",
        autocomplete = AutoComplete::Email,
        readonly = true,
    ))]
    email: String,
}
100
Cot.rs @cot.rs · 13/07/2026
@cot.rs v0.7 is here! This release packs in a wide range of improvements across forms, the ORM, security, and developer ergonomics. Let's dig in! github.com/cot-rs/cot/r...
github.com
Release cot-v0.7.0 · cot-rs/cot
View diff on diff.rs Cot v0.7 is here! This release packs in a wide range of improvements across forms, the ORM, security, and developer ergonomics. Read more on the blogpost here! New features [b...
122
Cot.rs @cot.rs · 21/06/2026
We're going to have our monthly Town Hall tomorrow. Join us at our Discord discord.cot.rs to listen to what we're up to recently and ask any questions you might have. See you there at 7:30pm CEST/6:30pm BST/10:30am PDT! discord.gg/PkFvAN7G?eve...
discord.gg
Join the Cot.rs Discord Server!
A community for Rust web development focused around Cot.rs framework | 93 members
012
Cot.rs @cot.rs · 30/03/2026
Our town hall just started, come join in to listen about the project progress and ask questions! discord.gg/PZgYqmcgwN?e...
discord.gg
Join the Cot.rs Discord Server!
A community for Rust web development focused around Cot.rs framework | 84 members
001
Cot.rs @cot.rs · 19/03/2026
That's all regarding technical updates, but there's more! We want to hear from you! We’re starting monthly community town halls where everyone is welcome to join, ask questions, and discuss the roadmap. 🗓️ First Town Hall: discord.gg/MQezaspU?eve...
discord.gg
Join the Cot.rs Discord Server!
A community for Rust web development focused around Cot.rs framework | 80 members
000
Cot.rs @cot.rs · 19/03/2026
While we like to focus on the user and developer experiences, it's nice to get performance benefits whenever feasible, and so in v0.6, we've replaced SHA-2 with BLAKE3 for both static file hashing and session authentication hashes 🚀
100
Cot.rs @cot.rs · 19/03/2026
We've overhauled the cot-site repository and moved the framework guide directly into the main cot repository. This change ensures that code and documentation updates happen at the same time. We have other documentation improvements in mind for next releases!
100
Cot.rs @cot.rs · 19/03/2026
While we're at the ORM topic, a small, yet useful fix is that now you can use raw Rust identifiers in model and field names. You can now name your fields, models, and tables however you want!
A screenshot of Cot.rs's model declaration with raw identifiers everywhere
100
Cot.rs @cot.rs · 19/03/2026
One of the long-awaited change in the ORM was the custom migrations. With Cot v0.6, you can now generate a migration template that executes arbitrary Rust code! Do you want to change format of your blog posts titles in the database? Now you can!
A screenshot of Cot.rs's custom migration code
100
Cot.rs @cot.rs · 19/03/2026
By decoupling the core from the rest of the framework, we've achieved a cleaner codebase and slightly faster build times. This is just the beginning; our long-term goal is to extract the ORM into its own crate as well, making it available for use in projects outside of the Cot framework. Stay tuned!
100
Cot.rs @cot.rs · 19/03/2026
The most significant architectural shift in this release is the extraction of our core logic into a dedicated crate: cot-core. This new foundation handles the essentials—HTTP request handling, error management, extractors, and other fundamental building blocks.
110
Cot.rs @cot.rs · 19/03/2026
It's time for another release of @cot.rs! This release is all about major under-the-hood improvements that set the stage for a more modular and performant future ✨ github.com/cot-rs/cot/r...
github.com
101
Cot.rs @cot.rs · 31/01/2026
In case you missed it, we've recently published the 0.5 version of Cot! This release brings in a cache system, email sending support, bulk insert for the ORM, among other changes! Have a look at the blog post about the release: mackow.ski/blog/cot-v05... Or go to the guide: cot.rs/guide/v0.5/
mackow.ski
Cot v0.5: New Features for Lazy Web Developers | Blog | Mateusz Maćkowski
021
Cot.rs @cot.rs · 11/09/2025
We plan to make releases much more often going forward instead of these 4-month gaps. It'll be much easier to remember what we've changed when it's fresh 😅 Check out the guide at: cot.rs/guide/v0.4/ And the blog post: mackow.ski/blog/cot-v04...
cot.rs
Cot
The Rust web framework for lazy developers. Build secure, type-safe web apps with ease.
010
Cot.rs @cot.rs · 11/09/2025
The new `FromRequestParts` derive macro cuts down on repetitive code. Instead of listing `Urls`, `StaticFiles`, and `RouteName` in every handler signature, you can bundle them into one struct. Small quality of life improvement that really adds up.
A screenshot of code showcasing FromRequestParts derive macro in use.
110
Cot.rs @cot.rs · 11/09/2025
Session stores are now pluggable, so you can switch between backends without touching your code. Use in-memory for development, Redis for production, or the new database-backed store, which is now the default since it's good enough until you need Redis performance.
A screenshot of TOML configuration showing usage of redis as a backend for cache for session store.
100
Cot.rs @cot.rs · 11/09/2025
Forms are much more capable now. File uploads work out of the box just by using a pre-defined special type! Full chrono support means date and time pickers actually work properly, and you can configure HTML attributes programmatically with restrictions like "images only".
An HTML form showing Cot support for chrono types in forms.
100
Cot.rs @cot.rs · 11/09/2025
Error handling got a complete redesign. Before, you mostly got 404s and 500s; now you get proper HTTP status codes for different error types. The new system uses a single error handler instead of separate ones, and we managed to shrink error structs from 110+ bytes down to just 8 bytes.
Nicely-looking error page on the Cot site.
100
Cot.rs @cot.rs · 11/09/2025
Cot v0.4 is out! This Rust web framework update brings significant improvements to error handling, forms, and session management. We've been working on this for four months and are quite pleased with how it turned out 🎉
111
Cot.rs @cot.rs · 13/05/2025
Please do try Cot and let us know how do you like it! github.com/cot-rs/cot
github.com
GitHub - cot-rs/cot: The Rust web framework for lazy developers.
The Rust web framework for lazy developers. Contribute to cot-rs/cot development by creating an account on GitHub.
000
Cot.rs @cot.rs · 13/05/2025
The static file framework has been improved to support content hashing. This is a big win for production performance, as it allows you to use aggressive caching strategies without worrying about cache invalidation.
100
Cot.rs @cot.rs · 13/05/2025
Another neat thing is the addition of the `IntoResponse` trait. This trait allows you to convert any type into a response, making it easier to return different types of responses from your request handlers.
100
Cot.rs @cot.rs · 13/05/2025
One of the biggest features is the automatic OpenAPI specification generation! It allows you to generate a specification for your API endpoints automatically, making it almost zero effort to generate Swagger UI for your RESTful endpoints that will always be kept in sync with the source code.
100
Cot.rs @cot.rs · 13/05/2025
The Cot v0.3.0 has just been released! This release introduces several new features, improvements, and bug fixes, making it even easier to build web applications with Cot. Go check it out on GitHub: github.com/cot-rs/cot/r... Or take a look at @mackow.ski's post: mackow.ski/blog/cot-v03...
github.com
110