FLUTTER ECOSYSTEM

borsh_annotation

Annotation used to make a Dart object borsh serializable.

Latest version
0.3.2
30-day downloads
8.6K
Likes
1
Pub points
140

Package Overview

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

Overview

borsh_annotation is a Dart package that provides annotations to enable Borsh serialization for Dart objects. It allows developers to mark classes and fields for efficient, compact binary serialization using the Borsh format, commonly used in blockchain applications. The package works with code generation to produce serialization logic at compile time, improving performance and reducing runtime overhead. It supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it ideal for cross-platform apps requiring high-performance data encoding. This tool is particularly useful in environments where size and speed matter, such as decentralized applications.

Use cases
  • Blockchain application development
  • Cross-platform data serialization
  • High-performance encoding of structured data
  • Interoperability with Borsh-based systems
  • Efficient storage and transmission of data
Key features
  • Compile-time code generation
  • Supports Borsh binary serialization
  • Platform-agnostic (multi-platform)
  • Minimal runtime overhead
  • Easy integration with Dart classes via annotations
  • Optimized for size and speed
Suitable for
  • Developers building blockchain or crypto-related apps
  • Teams needing fast, compact data serialization
  • Projects targeting multiple platforms
  • Applications requiring interoperability with Borsh-compatible systems
  • Performance-critical data encoding scenarios
Considerations
  • Requires code generation setup
  • Limited to classes annotated with @BorshSerializable
  • Depends on build_runner and associated dependencies
  • Not suitable for dynamic or unstructured data
  • Best used in projects with static data models
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add borsh_annotation

Categories

Related projects

No data available yet.