{"id":26601364,"url":"https://github.com/calebwin/svec","last_synced_at":"2025-08-09T09:26:58.707Z","repository":{"id":57669028,"uuid":"220529863","full_name":"calebwin/svec","owner":"calebwin","description":"quick little macro for beautiful Dart-like lists in Rust","archived":false,"fork":false,"pushed_at":"2019-11-08T19:08:51.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T05:18:33.951Z","etag":null,"topics":["dart","list","rust","vec"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/calebwin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-08T18:57:55.000Z","updated_at":"2019-11-08T19:08:52.000Z","dependencies_parsed_at":"2022-08-27T01:40:54.709Z","dependency_job_id":null,"html_url":"https://github.com/calebwin/svec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/calebwin/svec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebwin%2Fsvec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebwin%2Fsvec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebwin%2Fsvec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebwin%2Fsvec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calebwin","download_url":"https://codeload.github.com/calebwin/svec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebwin%2Fsvec/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267978037,"owners_count":24175245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","list","rust","vec"],"created_at":"2025-03-23T18:39:33.664Z","updated_at":"2025-07-31T02:37:12.337Z","avatar_url":"https://github.com/calebwin.png","language":"Rust","readme":"# `svec`\n\n[![](http://meritbadge.herokuapp.com/svec)](https://crates.io/crates/svec)\n[![](https://docs.rs/svec/badge.svg)](https://docs.rs/svec)\n\nSvec lets you create beautiful Dart-like lists in Rust that are both readable and concise.\n\nIf you're making a list of things in Rust, you're probably using `vec`.\n\n```rust\n// a list\nlet row = vec![\n\tElem::IconButton(\"hamburger\"),\n\tElem::Space,\n\tElem::IconButton(\"info\"),\n\tElem::IconButton(\"profile\")\n];\n```\n\n`svec` lets you do all the things you can do with `vec`, but it also adds \"collection if\" and \"collection for\".\n\n```rust\n// a list with svec\nlet row = svec![\n\tElem::IconButton(\"hamburger\"),\n\tElem::Space,\n\tElem::IconButton(\"info\"),\n\tElem::IconButton(\"profile\"),\n\tif isLiteVersion { Elem::IconButton(\"store\") }\n];\n```\n\nHere's a \"collection for\".\n\n```rust\n// a list with vec + svec\nlet row = vec![\n\tElem::IconButton(\"hamburger\"),\n\tElem::Space,\n\tElem::IconButton(\"info\"),\n\tElem::IconButton(\"profile\"),\n\tElem::MenuBar(svec![\n\t\tfor friend in friends.take(3) { Elem::MenuItem(friend) },\n\t\tElem::MenuItem(\"All friends\"),\n\t\tElem::MenuItem(\"All people\"),\n\t])\n];\n```\n\nUsing `svec` in your project is super easy.\n\n1. Add `svec = 0.1.0` to your `Cargo.toml`.\n2. Add `use svec::*`.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebwin%2Fsvec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalebwin%2Fsvec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebwin%2Fsvec/lists"}