Has anyone tried Flutter on Windows via Ubuntu in Win 10 Anniversary update?

593 views
Skip to first unread message

da...@tuppeny.com

unread,
Aug 8, 2016, 10:24:29 AM8/8/16
to Flutter Dev
Every now and then I stumble across Flutter again and decide to check it out; then re-discover that it doesn't support Windows (!).

The recent Windows 10 update added the "Windows Subsystem for Linux" (even though to me it sounds like a Linux subsystem for Windows!) that allows running Bash on Ubuntu.

I wondered if anyone had tried to run Flutter there? (I haven't set up Bash yet, but I was hoping if it doesn't work someone could safe me all the effort of trying it!)

Adam Barth

unread,
Aug 8, 2016, 10:29:20 AM8/8/16
to da...@tuppeny.com, Flutter Dev
I haven't tried it, but I suspect it won't work out of the box.  In order to create Flutter apps, you need a few binaries that run on the host machine (e.g., gen_snapshot and sky_snapshot).  We provide pre-built versions of these binaries for Mac and Linux, but we don't provide any pre-built versions of these binaries for Windows.

If you're feeling adventurous, you could try building these binaries from source for Windows using the https://github.com/flutter/engine repository.

Adam

Danny Tuppeny

unread,
Aug 8, 2016, 10:44:25 AM8/8/16
to Adam Barth, Flutter Dev
On Mon, 8 Aug 2016 at 15:29 Adam Barth <aba...@google.com> wrote:
I haven't tried it, but I suspect it won't work out of the box.  In order to create Flutter apps, you need a few binaries that run on the host machine (e.g., gen_snapshot and sky_snapshot).  We provide pre-built versions of these binaries for Mac and Linux, but we don't provide any pre-built versions of these binaries for Windows.

I'm don't mean in a VM, WSL is basically running native Linux binaries on Windows (it works be rewriting syscalls).

That said, I'm curious about why you need to run things on the "host" machine; whatever the reason for that might be an issue for WSL (for example if it's to access a device over USB, I doubt that works over WSL either). 

Adam Barth

unread,
Aug 8, 2016, 10:49:40 AM8/8/16
to Danny Tuppeny, Flutter Dev
On Mon, Aug 8, 2016 at 7:44 AM Danny Tuppeny <da...@tuppeny.com> wrote:
On Mon, 8 Aug 2016 at 15:29 Adam Barth <aba...@google.com> wrote:
I haven't tried it, but I suspect it won't work out of the box.  In order to create Flutter apps, you need a few binaries that run on the host machine (e.g., gen_snapshot and sky_snapshot).  We provide pre-built versions of these binaries for Mac and Linux, but we don't provide any pre-built versions of these binaries for Windows.

I'm don't mean in a VM, WSL is basically running native Linux binaries on Windows (it works be rewriting syscalls).

That might work then.  It would be worth trying.

That said, I'm curious about why you need to run things on the "host" machine; whatever the reason for that might be an issue for WSL

The binaries we run on the host machine are basically compilers for Dart code.  For example, one of them takes your Dart code as input and produces ARM instructions as output.  There are a couple different flavors of these compilers to support the different workflows (e.g., development and production).
 
(for example if it's to access a device over USB, I doubt that works over WSL either).

We use the tools that come with Android Studio to communicate with Android devices over USB.  Presumably we'd want to use the Windows version of Android Studio on Windows.  There might be some work to integrate the flutter command line tool with the Windows version of Android Studio, but I won't expect that to be too difficult.

Adam

Danny Tuppeny

unread,
Aug 8, 2016, 10:58:36 AM8/8/16
to Adam Barth, Flutter Dev
On Mon, 8 Aug 2016 at 15:49 Adam Barth <aba...@google.com> wrote:
We use the tools that come with Android Studio to communicate with Android devices over USB.  Presumably we'd want to use the Windows version of Android Studio on Windows.  There might be some work to integrate the flutter command line tool with the Windows version of Android Studio, but I won't expect that to be too difficult.

(and again to the list... sorry!)

How does the Flutter command line tool communicate with the Android Studio tools? If it's by executing commands it probably won't work (I guess WSL can't execute Windows applications) but if it's over a TCP connection then maybe it'll work just fine.
 

Adam Barth

unread,
Aug 8, 2016, 12:22:40 PM8/8/16
to Danny Tuppeny, Flutter Dev
It executes them as commands.

Adam

Danny Tuppeny

unread,
Aug 8, 2016, 12:30:05 PM8/8/16
to Adam Barth, Flutter Dev
On Mon, 8 Aug 2016 at 17:22 Adam Barth <aba...@google.com> wrote:
How does the Flutter command line tool communicate with the Android Studio tools? If it's by executing commands it probably won't work (I guess WSL can't execute Windows applications) but if it's over a TCP connection then maybe it'll work just fine.

It executes them as commands.

Doh!

I guess maybe waiting for official Windows support would be the best way then! Thanks for the info :)
Reply all
Reply to author
Forward
0 new messages