fast_rust 0.2.0
fast_rust: ^0.2.0 copied to clipboard
Rust-powered kernels for Flutter and Dart over zero-copy dart:ffi: photo recoloring, photo to coloring page, flood fill, falling sand, blur.
0.2.0 #
- Photo to coloring page:
FastRust.photoToColoringPage(and...Async) turns a photo into black outlines on white, ready to fill. It blurs, quantizes colours with k-means, removes speckles with a majority filter, merges regions smaller thanminRegion, and drawslineWidth-pixel outlines plus a frame. Returns aColoringPagewith the page, a label map and the photo's palette (for a "reveal" or color-by-number mode). - Falling sand:
FastRust.sandStepadvances a sand/water/wall grid by one deterministic step;FastRust.sandRenderRgbadraws it. Cell values are inSandMaterial. spreadDistancesRgbaandpaintByDistanceRgbanow reject adistancesbuffer that overlaps the image buffers.DartReferenceversions of all new kernels, matching Rust bit for bit.
0.1.0 #
- Initial release. Rust kernels called through zero-copy
dart:ffi@Nativefunctions; a native-assets build hook runscargofor the target platform (Android, iOS, macOS, Linux, Windows). - Photo recoloring:
FastRust.recolorRegionRgbaselects a connected region of a real image by color tolerance (magic wand) and tints it while keeping each pixel's brightness, so texture survives. - Pixel-art coloring:
floodFillRgba(scanline bucket fill with tolerance) andcoloringPageRgba(generated coloring pages). - Image processing: multi-threaded
boxBlurRgba(O(pixels) for any radius) andgrayscaleRgba. sha256,sortFloat64(IEEE-754 total order),countPrimes,dot, and a multi-threadedmandelbrotRgba....Asyncvariants run on a background isolate with non-leaf calls.DartReference: pure-Dart versions of every kernel, used by the tests to check that Rust output matches bit for bit.
