fast_blurhash 0.0.1-dev.3 copy "fast_blurhash: ^0.0.1-dev.3" to clipboard
fast_blurhash: ^0.0.1-dev.3 copied to clipboard

A high-performance Dart FFI package for decoding BlurHash, leveraging Rust for faster processing.

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 faster 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.

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

screenshot from the benchmarks demo
24
likes
0
pub points
40%
popularity

Publisher

verified publisherraouf.dev

A high-performance Dart FFI package for decoding BlurHash, leveraging Rust for faster processing.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cli_config, ffi, ffigen, logging, native_toolchain_rust

More

Packages that depend on fast_blurhash