News for hackers. Stuff that matters.
Re:Flutter for Linux by timsneath on Wednesday July 08, 2020 @03:21PM (#23773310)
Curious what platforms you're interested in integrating with. We're experimenting here and looking for feedback. As a fun demonstration of the effectiveness of FFI, you can now build Petzold-style native Windows code with Dart: https://github.com/timsneath/win32/blob/master/example/hello...

And here's a 500-line version of the Kilo console text editor built with Dart: https://github.com/timsneath/dart_console/blob/master/exampl...

Unlike the original, it runs on both Windows and UNIX-based operating systems.

Re:Flutter for Linux by vetinari on Wednesday July 08, 2020 @03:59PM (#23773643)
I'm actually more interested in Linux side of things. That doesn't prevent me from looking how things are done on Windows, of course.

To be fair, last time I looked into dart, the idea of FFI was ports, which was too overcomplicated and undercapable, if you needed something like Gtk or Vulkan. Looking into it now, I see the dart:ffi package is shaping up nicely, so I will have another look at dart again.

Re:Flutter for Linux by malkia on Wednesday July 08, 2020 @06:49PM (#23775072)
Tim, it should be possible that the main .exe (or binary on linux/osx) to export functions, and they can be found back through the flutter_engine.dll/.so, right? (At least on windows it's possible for the exe to __declspec(dllexport) things, not sure on Linux).

But even if not, if there is a way to (given might be slow and tedious) to compile what would've been flutter_engine.dll statically linked to your main (host) app, and maybe somewhat hinting here is how to find the "GetProcAddr/dlsym/etc." functions - if one is to look for them.

Further on, the generated from dart .so file can be embded (as resource? or slapped at the end of the binary/.exe?) + slapping all other resource - resulting in single app :)

I know it's possible, just not so easy to support it (I guess). It's similar to have java/python can be packed into one executable with all C/C++ ffi functions they call (at cost of some build time and effort to achieve so).

Then you'll have killer platform for video conferencing (zoom, bluejeans, etc.), messaging (slack, etc.) - and just single binary to deploy.

(Oh, on top of that slap a web server into it, and make it that if called with specific command-line option, now it acts as web-server, and the app is visible through the web).