{"id":29057684,"url":"https://github.com/mcmah309/rust","last_synced_at":"2025-06-27T06:06:42.240Z","repository":{"id":210173466,"uuid":"725710963","full_name":"mcmah309/rust","owner":"mcmah309","description":"A pure Dart implementation of patterns found in the Rust programming language. Types include Result, Option, Cell, Slice, Array, Iterator, etc. Facilitates functional programming and error handling.","archived":false,"fork":false,"pushed_at":"2024-12-23T01:20:21.000Z","size":1025,"stargazers_count":132,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-25T08:03:07.410Z","etag":null,"topics":["dart","rust"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcmah309.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-30T18:01:06.000Z","updated_at":"2025-06-12T12:23:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"b190e1d5-2b9b-47c1-a3a1-60851adf3410","html_url":"https://github.com/mcmah309/rust","commit_stats":null,"previous_names":["mcmah309/rust_core","mcmah309/rust"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/mcmah309/rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmah309%2Frust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmah309%2Frust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmah309%2Frust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmah309%2Frust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcmah309","download_url":"https://codeload.github.com/mcmah309/rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcmah309%2Frust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262202515,"owners_count":23274383,"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","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","rust"],"created_at":"2025-06-27T06:06:39.383Z","updated_at":"2025-06-27T06:06:42.234Z","avatar_url":"https://github.com/mcmah309.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/mcmah309/rust/master/.github/DR.png\" width=\"250px\"\u003e\n\n[![Pub Version](https://img.shields.io/pub/v/rust.svg)](https://pub.dev/packages/rust)\n[![Dart Package Docs](https://img.shields.io/badge/documentation-pub.dev-blue.svg)](https://pub.dev/documentation/rust/latest/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/mcmah309/rust/actions/workflows/test.yml/badge.svg)](https://github.com/mcmah309/rust/actions)\n\n[rust](https://github.com/mcmah309/rust) (formally known as [rust_core](https://pub.dev/packages/rust_core)) is a pure Dart implementation of patterns found in the [Rust programming language](https://www.rust-lang.org/), bringing powerful tools previously only available to Rust developers to Dart developers!\n\nNew types include [Result](https://mcmah309.github.io/rust/libs/result/result.html), [Option](https://mcmah309.github.io/rust/libs/option/option.html), [Cell](https://mcmah309.github.io/rust/libs/cell/cell.html), [Slice](https://mcmah309.github.io/rust/libs/slice/slice.html), [Array](https://mcmah309.github.io/rust/libs/array/array.html), [Iterator](https://mcmah309.github.io/rust/libs/iter/iter.html), [Channels](https://mcmah309.github.io/rust/libs/sync/channels.html), [Mutex](https://mcmah309.github.io/rust/libs/sync/mutex.html), [Path](https://mcmah309.github.io/rust/libs/path/path.html) and more.\n\nSee the [Documentation Book 📖](https://mcmah309.github.io/rust) for a deeper dive!\n\n### Example: Rust Language vs rust Package\n---\n\u003e Goal: Get the index of every \"!\" in a string not followed by a \"?\"\n\n**[Rust](https://play.rust-lang.org/?version=nightly\u0026mode=debug\u0026edition=2021\u0026gist=f8a2979808d21a7bfe22a3cfb70ec389):**\n```rust\nuse std::iter::Peekable;\n\nfn main() {\n  let string = \"kl!sd!?!\";\n  let mut answer: Vec\u003cusize\u003e = Vec::new();\n  let mut iter: Peekable\u003c_\u003e = string\n      .chars()\n      .map_windows(|w: \u0026[char; 2]| *w)\n      .enumerate()\n      .peekable();\n\n  while let Some((index, window)) = iter.next() {\n      match window {\n          ['!', '?'] =\u003e continue,\n          ['!', _] =\u003e answer.push(index),\n          [_, '!'] if iter.peek().is_none() =\u003e answer.push(index + 1),\n          _ =\u003e continue,\n      }\n  }\n  println!(\"{:?}\", answer); // [2, 7]\n}\n```\n**Dart:**\n```dart\nimport 'package:rust/rust.dart';\n\nvoid main() {\n  final string = \"kl!sd!?!\";\n  Vec\u003cint\u003e answer = [];\n  Peekable\u003c(int, Arr\u003cString\u003e)\u003e iter = string\n      .chars()\n      .mapWindows(2, identity)\n      .enumerate()\n      .peekable();\n\n  while (iter.moveNext()) {\n    final (index, window) = iter.current;\n    switch (window) {\n      case [\"!\", \"?\"]:\n        break;\n      case [\"!\", _]:\n        answer.push(index);\n      case [_, \"!\"] when iter.peek() == null: // or `iter.peekOpt().isNone()`\n        answer.push(index + 1);\n    }\n  }\n  print(answer); // [2, 7]\n}\n```\n\n## Project Goals\nrust's primary goal is to give Dart developers access to powerful tools previously only available to Rust developers.\n\nTo accomplish this, Rust's functionalities are carefully adapted to Dart's paradigms, focusing on a smooth idiomatic language-compatible integration.\nThe result is developers now have a whole new toolset to tackle problems in Dart.\n\nTrue to the Rust philosophy, rust strives to bring reliability and performance in every feature. Every feature is robustly tested. Over 500 meaningful test suites and counting.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcmah309%2Frust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcmah309%2Frust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcmah309%2Frust/lists"}