Search packages, repositories and app categories

Package detailsv3.1.0

rust

A pure Dart implementation of Rust patterns. Types include Result, Option, Cell, Slice, Array, Iterator, Channels, Mutex, Path, etc.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
509
Likes
16
Pub points
140

Install package

flutter pub add rust

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A pure Dart implementation of Rust-inspired patterns and types, bringing idiomatic Rust concepts like Result, Option, Mutex, and Iterator to Dart. It enables safer, more expressive code by mimicking Rust's error handling, ownership semantics, and functional programming constructs. Designed for developers familiar with Rust or seeking similar safety and clarity in Dart applications. The package supports multiple platforms including mobile, web, and desktop.

Use cases

  • Error handling with Result and Option types
  • Safe state management using Cell and Mutex
  • Functional programming with Iterator and Slice
  • Cross-platform apps needing Rust-like safety
  • Building robust APIs with structured error handling

Key features

  • Pure Dart implementation
  • Rust-style Result and Option types
  • Thread-safe synchronization with Mutex
  • Functional utilities like Iterator and Slice
  • Support for channels and path manipulation

Suitable for

  • Dart developers familiar with Rust
  • Projects prioritizing type safety
  • Teams adopting functional programming patterns
  • Multi-platform applications requiring robustness
  • Developers wanting Rust-like error handling in Dart

Considerations

  • Not a full Rust runtime
  • Limited to pattern emulation, not language interoperability
  • Learning curve for developers unfamiliar with Rust concepts
  • Performance overhead from abstraction layers
  • No native Rust code execution

Categories

Dependencies

Dependency list 2 items

Projects using this package