Rust-Flutter rs: flutter-rs — Build flutter desktop app in dart & rust.

flutter-rs flutter version Gitter chat MIT licensed

Build flutter desktop app in dart & rust.


Get Started

Install requirements


  • install the cargo flutter command

    cargo install cargo-flutter

  • create your new project from the template

    git clone

  • To develop with cli hot-reloading:

    cd flutter-app-template

    cargo flutter run


  • To build distribution, use: cargo flutter --format appimage build --release


To contribute to flutter-rs, please see CONTRIBUTING.




  • error: linking with `link.exe` failed: exit code: 1181; cannot open input file 'flutter_engine.lib'
    error: linking with `link.exe` failed: exit code: 1181; cannot open input file 'flutter_engine.lib'

    Mar 9, 2020

    I tried build and run the example on Windows environmennt, but it was failed. Repro and errors is below:


    1. Install the flutter sdk ( git clone and append the bin dir to the PATH )
    2. cargo install cargo-flutter
    3. git clone
    4. cd flutter-app-template
    5. cargo flutter run

    Then, I got the error in the below:

    flutter build bundle lib/main.dart
       Compiling flutter-app-template v0.1.0 (C:\Users\usagi\tmp\flutter-app-template)
    error: linking with `link.exe` failed: exit code: 1181
      = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\usagi\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" ( ... very long list ... ) "ws2_32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "msvcrt.lib"
      = note: LINK : fatal error LNK1181: cannot open input file 'flutter_engine.lib'

    I was search the flutter_engine.lib in the target directory and flutter sdk directory, but the file is not found.

    p-tools p-windows t-bug 
  • Windows startup crashed
    Windows startup crashed

    Mar 21, 2020

    Error message:

    [FATAL:D:\a\engine-builds\engine-builds\engine\src\flutter\fml\memory\ref_ptr.h(115)] Check failed: ptr_.

    How to get the backtrace of flutter engine?

    Flutter 1.12.13+hotfix.8 • channel stable •
    Framework • revision 0b8abb4724 (6 weeks ago) • 2020-02-11 11:44:36 -0800
    Engine • revision e1e6ced81d
    Tools • Dart 2.7.0
    flutter-rs/flutter-app-template/cargo-flutter are all git master version
    p-windows t-bug t-critical 
  • Error: Couldn't find flutter sdk
    Error: Couldn't find flutter sdk

    Apr 14, 2020

    I followed the correct steps, but when I run "cargo flutter run " I got a "error: couldn't find shuttle SDK"

    p-tools t-bug t-critical 
  • Update documentation
    Update documentation

    Apr 30, 2020


  • flutter-winit fails to compile on MacOS
    flutter-winit fails to compile on MacOS

    May 24, 2020

    I get a whole string of "method not found in `flutter_engine::FlutterEngine" errors from flutter-winit when running cargo flutter run on the example file. I'm running MacOs 10.14.

  • no matching package named `android-ndk` found
    no matching package named `android-ndk` found

    Jun 4, 2020

        Updating index
        Updating git repository ``
        Updating git repository ``
        Updating git repository ``
        Updating git repository ``
    error: no matching package named `android-ndk` found
    location searched:

    it looks like android-ndk got renamed to ndk.

  • Use builder pattern
    Use builder pattern

    Feb 9, 2020

    An initial step towards supporting more configuration options.

    In the future, handler will be broken down in opengl handler or something of the likes, allowing the engine to be constructed with with_gl_backend(), with_software_backend() etc.

    It also then allows for optional features to be added in the future, such as with_semantics_handler, or with_persistent_cache.

    Currently, FlutterEngine::new is going to get bloated, one solution is some sort of FlutterConfig struct for data that doesn't change, then allowing engine.config().assets()

  • Android support?
    Android support?

    Jan 31, 2019

    Hey any plan on supporting Android as well?

  • flutter + rs on (macos) desktop
    flutter + rs on (macos) desktop

    Feb 29, 2020

    I've been investigating flutter for the desktop for a new project. I develop on Mac, but want to develop for cross-platform.

    I was happy to see and be able to use the flutter desktop support as documented here:

    But I haven't figured out how to do flutter development in rust using flutter-rs for the desktop.

    I think the problems are related to the use of a specific flutter-engine?

    Sorry it's a bit of a vague question - but, is it possible for me to configure things to use flutter-rs, compatible with flutter master channel to get support for desktop on macos?

  • Add flutter-winit
    Add flutter-winit

    Dec 23, 2019

    This works on linux wayland and kind of works on android using a simple test app.

    Things that are missing:

    • [x] window and platform handlers need to be implemented properly
    • [x] text plugin needs to be hooked up
    • [ ]
    • [ ]
    • [x] app demo needs to be updated and some android specific code added
  • build and link `libflutter_engine` statically
    build and link `libflutter_engine` statically

    Aug 7, 2019

    Hello, Is there is any reason why we don't already build the flutter-engine and link it as a static library? it would make it easier to bundle the whole application and send it to the consumer.

    Also, I made a try to build my simple (counter) project to musl target. but it failed to compile glfw, anyway it's not related maybe I would open another issue for that.

    Here is some information about my system:

    $ uname -a
    Linux Hex 4.19.60-1-MANJARO #1 SMP PREEMPT Sun Jul 21 12:17:26 UTC 2019 x86_64 GNU/Linux
    $ rustc -Vv                
    rustc 1.38.0-nightly (dddb7fca0 2019-07-30)
    binary: rustc
    commit-hash: dddb7fca09dc817ba275602b950bb81a9032fb6d
    commit-date: 2019-07-30
    host: x86_64-unknown-linux-gnu
    release: 1.38.0-nightly
    LLVM version: 9.0
  • Hack to make X11 work
    Hack to make X11 work

    Feb 3, 2020

    This is a lot less invasive than my previous pull requests. Feels like a hack though. I am checking against the OS which doesn't specifically block out X11, but seeing as how flutter uses X11 for linux, we shouldn't run into any issues.