flt is a Flutter Terminal Embedder, implementing the Flutter Engine's Custom Embedder API.
With a terminal emulator that supports Kitty graphics, 60fps rendering can be achieved.
wonderous_kitty.mov
Otherwise, it falls back to using ANSI Escape Codes.
wonderous_ansi.mov
This works over SSH though it may be slow depending on the network.
Kitty rendering was mostly developed on macOS. Tested on iTerm2 and Ghostty.
ANSI rendering should work on more terminals.
This project uses submodules, so pass the --recurse-submodules flag.
git clone --recurse-submodules git@github.com:jiahaog/flt.gitInstall Rust first, then at the root of the monorepo, the following command will build the Sample Flutter App, and run it with the terminal embedder.
cargo runcargo run -- <path to the root of your flutter project>The terminal embedder can be registered as a Custom Device to use it directly with the flutter tool (supporting hot reload, hot restart etc.).
-
Enable Custom Devices:
flutter config --enable-custom-devices
-
Build the Embedder:
cargo build --release
-
Install Custom Device:
Run the installation script to configure the custom device and launcher:
./install_custom_device.sh
-
Run:
flutter run -d terminal
# See help for `flt-cli`.
cargo run -- --help
# See help for `flt`.
cargo run -- --args=--helpflt- The terminal embedder.flt-cli- A small CLI utility to make local development easier. By default, thecargo runcommand at the root of the repository will run this.flutter-sys- Safe Rust bindings to the Flutter Embedder API.sample_app- A sample Flutter Project used for local development.third_party/flutter- A submodule checkout of the Flutter Framework.