[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73345":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},73345,"toasty","tokio-rs\u002Ftoasty","tokio-rs","An async ORM for Rust","",null,"Rust",2614,113,21,67,0,12,40,274,36,108.17,"MIT License",false,"main",true,[],"2026-06-12 04:01:09","\u003Cdiv align=\"center\">\n  \u003Ch1>Toasty\u003C\u002Fh1>\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\">\n  \u003Ch3>The cozy, easy ORM for Rust\u003C\u002Fh3>\n  \u003Ca href=\"https:\u002F\u002Ftokio-rs.github.io\u002Ftoasty\u002F0.6.1\u002Fguide\u002F\">Guide\u003C\u002Fa> •\n  \u003Ca href=\"https:\u002F\u002Fdocs.rs\u002Ftoasty\">API Docs\u003C\u002Fa> •\n  \u003Ca href=\"https:\u002F\u002Fcrates.io\u002Fcrates\u002Ftoasty\">Crates.io\u003C\u002Fa> •\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Ftokio\">Discord\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003Cbr\u002F>\n\n\u003Cdiv align=\"center\">\n\n[![Crates.io][crates-badge]][crates-url]\n[![MIT licensed][mit-badge]][mit-url]\n[![Build Status][actions-badge]][actions-url]\n[![Discord chat][discord-badge]][discord-url]\n\n\u003C\u002Fdiv>\n\n[crates-badge]: https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Ftoasty.svg\n[crates-url]: https:\u002F\u002Fcrates.io\u002Fcrates\u002Ftoasty\n[mit-badge]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\n[mit-url]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Ftoasty\u002Fblob\u002Fmain\u002FLICENSE\n[actions-badge]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Ftoasty\u002Fworkflows\u002FCargo%20Build%20%26%20Test\u002Fbadge.svg\n[actions-url]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Ftoasty\u002Factions?query=workflow%3A%22Cargo+Build+%26+Test%22+branch%3Amain\n[discord-badge]: https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F500028886025895936.svg?logo=discord&style=flat-square\n[discord-url]: https:\u002F\u002Fdiscord.gg\u002Ftokio\n\nToasty supports SQL databases (SQLite, PostgreSQL, MySQL) and DynamoDB. It does\nnot hide database capabilities — it exposes features based on the target\ndatabase.\n\n## Using Toasty\n\nYou will define your data model using Rust structs annotated with the\n`#[derive(toasty::Model)]` derive macro. Here is the\n[hello-toasty](examples\u002Fhello-toasty\u002Fsrc\u002Fmain.rs) example.\n\n```rust\n#[derive(Debug, toasty::Model)]\nstruct User {\n    #[key]\n    #[auto]\n    id: u64,\n\n    name: String,\n\n    #[unique]\n    email: String,\n\n    #[has_many]\n    todos: toasty::HasMany\u003CTodo>,\n}\n\n#[derive(Debug, toasty::Model)]\nstruct Todo {\n    #[key]\n    #[auto]\n    id: u64,\n\n    #[index]\n    user_id: u64,\n\n    #[belongs_to(key = user_id, references = id)]\n    user: toasty::BelongsTo\u003CUser>,\n\n    title: String,\n}\n```\n\nThen, you can easily work with the data model:\n\n```rust\n\u002F\u002F Create a new user and give them some todos.\nlet user = toasty::create!(User {\n    name: \"John Doe\",\n    email: \"john@example.com\",\n    todos: [\n        { title: \"Make pizza\" },\n        { title: \"Finish Toasty\" },\n        { title: \"Sleep\" },\n    ],\n}).exec(&mut db).await?;\n\n\u002F\u002F Load the user from the database\nlet user = User::get_by_id(&mut db, &user.id).await?;\n\n\u002F\u002F Load and iterate the user's todos\nlet todos = user.todos().exec(&mut db).await?;\n\nfor todo in &todos {\n    println!(\"{:#?}\", todo);\n}\n```\n\n## SQL and NoSQL\n\nToasty supports both SQL and NoSQL databases. Current drivers are SQLite,\nPostgreSQL, MySQL, and DynamoDB. However, it does not aim to abstract the\ndatabase. Instead, Toasty leans into the target database's capabilities and\naims to help the user avoid issuing inefficient queries for that database.\n\nWhen targeting both SQL and NoSQL databases, Toasty generates query methods\n(e.g. `get_by_id` only for access patterns that are indexed). When targeting a\nSQL database, Toasty might allow arbitrary additional query constraints. When\ntargeting a NoSQL database, Toasty will only allow constraints that the\nspecific target database can execute. For example, with DynamoDB, query methods\nmight be generated based on the table's primary key, and additional constraints\nmay be set for the sort key.\n\n## Application data model vs. database schema\n\nToasty decouples the application data model from the database's schema. By\ndefault, a toasty application schema will map 1-1 with a database schema.\nHowever, additional annotations may be specified to customize how the\napplication data model maps to the database schema.\n\n## Roadmap\n\nDevelopment priorities are based on feedback and contributions. If you run into\nmissing features or rough edges, please open an issue or submit a pull request.\nPlanned work lives under [`docs\u002Fdev\u002Froadmap.md`](docs\u002Fdev\u002Froadmap.md).\n\n## Contributing\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md). Small fixes can go straight to a PR;\nlarger changes follow a lightweight propose → roadmap + design doc → implement\nflow.\n\n## License\n\nThis project is licensed under the [MIT license].\n\n[MIT license]: LICENSE\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in Toasty by you, shall be licensed as MIT, without any additional\nterms or conditions.\n","Toasty 是一个为 Rust 设计的异步 ORM。它支持多种数据库，包括 SQLite、PostgreSQL、MySQL 以及 DynamoDB，并且不隐藏数据库的功能，而是基于目标数据库的能力来暴露特性。通过使用 `#[derive(toasty::Model)]` 宏注解 Rust 结构体定义数据模型，开发者可以轻松地进行数据操作如创建、查询等。此外，Toasty 在生成查询方法时会考虑索引模式以避免低效查询，尤其适用于需要高效处理异步数据库操作的 Rust 应用场景。",2,"2026-06-11 03:45:06","high_star"]