パッケージ、リポジトリ、アプリカテゴリを検索

GitHub リポジトリRahiche/fast_blurhash

fast_blurhash

高速な処理を実現するため、Rust を活用した BlurHash のデコードに適した高性能な Dart FFI パッケージ。

fast_blurhash のプロジェクト画像
スター
11
フォーク
1
最終プッシュ(UTC)
2024/09/11
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

fast_blurhash

A Dart FFI package project that uses Rust to decode the blurhash and encode the final image, utilizing FFI to call these functions. This package exists because it works +20x faster on average than the common Dart implementation and can be tested in release mode by running the benchmarks.dart demo.

It only works with the latest version of Flutter on the main branch and requires the following feature to be enabled: flutter config --enable-native-assets. For more details, refer to this issue.

Status

  • Uses experimental APIs which might change in the future.
  • The first time call takes longer than the average time so I have added a setup function to do a warmup call.
  • Tested only on iOS and MacOs in release mode.
  • Significant performance difference between release mode and debug mode; do not rely on debug mode results.

Project structure

This template uses the following structure:

  • rust: Contains the rust source code.

  • lib: Contains the Dart code that defines the API of the plugin, and which calls into the native code using dart:ffi.

Benchmarks

To test the performance of the package in release mode, run the benchmarks.dart demo.

So far I have tried this one iOS and macos release mode, don't run the benchmarks on debug mode.

Run the benchmark using : flutter run -t lib/benchmarks.dart --release

iPhone 15 pro:
screenshot from the benchmarks demo on iPhone 15 pro
M1 Macbook Pro:
screenshot from the benchmarks demo on macbook pro
Raouf Rahiche GitHub avatar
GitHub 作者

Raouf Rahiche ↗

London, UK
言語DartC++CMakeRustSwiftHTMLCKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 7 件

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗