Using Rust in your next Flutter SDK
summary
Building a Flutter SDK with a Rust core, Ditto reuses one Rust implementation across nine client languages and measures roughly 10x faster for a hot path versus Dart; integration uses cargo + CMake, Dart's FFI and the Dart-published ffigen tool. Practical pitfalls include FFI dead-code stripping (fixed by forcing symbol retention), ownership bugs causing use-after-free (fixed by transferring and exposing Rust free functions), and a stubborn JNI header mismatch that forces keeping some Android calls in Dart.
AI-written summary · about
chapters (7)
- 0:00Rust in Flutter SDKs
- 3:40Why Rust for SDKs
- 8:18Rust memory safety & performance
- 12:07Rust FFI with Dart
- 16:00Safe Dart from Rust
- 21:20Android JNI challenges
- 27:00Q&A
related talks
31mBuilding a rendering engine in Rust for Flutter
37mUsing Rust in Your Next KMP App
01h 21mLeveraging Rust to build cross-platform mobile libraries
41mWhy is Flutter the mobile SDK developers deserve...
40mDart: Productive, Fast, Multi-Platform - Pick 3
45mC++ Rust and Qt Easier than you think
37mSharing Code between iOS & Android with Rust
31mUsing Rust from C... or Any Language
