Flutter, Dart, and WASM-GC: A new model for Web applications by Kevin Moore @ Wasm I/O 2023

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 มี.ค. 2023
  • Wasm I/O 2023 / 23-24 March, Barcelona
    Slides: docs.google.com/presentation/...
    Support for garbage collection within WebAssembly (WASM-GC) will bring a host of new languages and frameworks to the web app space. Learn how the Dart and Flutter teams at Google are building on WASM-GC (among other upcoming standards) to bring richer, faster, more consistent applications to the web
    Until now, WASM-compiled browser applications have been mostly limited to systems programming languages - allowing a number of traditionally desktop experiences to run on the web. (Think AutoCad, PhotoShop, Google Earth.) The implementation of WASM-GC across WASM runtimes will bring a set of new languages and frameworks to an ecosystem dominated by C/C++ and Rust. The open source Dart and Flutter projects at Google have spent over a year adding WebAssembly as a target platform with the hope of improving application load time and interactive performance for Flutter experiences on the web. This talk will cover how WASM-GC expands the WASM ecosystem, some details on how Flutter and Dart approached migrating our existing JS-compiled web support to WebAssembly, and our hopes for a ecosystem that embraces WASM-GC across the browser and server to enable a more portable, secure, and interoperable future of computer systems.

ความคิดเห็น • 87

  • @_____case
    @_____case ปีที่แล้ว +54

    "This is in a browser. None of this is DOM. This is 100% Canvas."

    • @Tldrx
      @Tldrx ปีที่แล้ว

      can WASM control the canvas directly?

  • @-www.chapters.video-
    @-www.chapters.video- 11 หลายเดือนก่อน +7

    00:00 Introduction to Dart and Flutter
    00:41 Features of Dart
    03:55 Dart as a General Purpose Language
    04:59 Flutter as a UI Toolkit
    06:10 Key Pillars of Flutter
    07:22 Flutter's Portability and Open Source Nature
    08:49 Example of a Native Desktop App in Flutter
    10:16 Using JavaScript, HTML, and CSS for web development with Flutter
    11:01 Switching to Skia and CanvasKit for better performance and fidelity
    12:08 Creating desktop experiences with Flutter web and CanvasKit
    12:55 Flutter web's performance and portability for production apps
    14:37 Challenges of implementing garbage collection in WebAssembly
    15:58 Steps involved in compiling Dart to WebAssembly
    20:01 Improving Fidelity and Accuracy
    21:00 Interoperability and Performance
    22:11 Material 3 Demo
    23:41 WasmGC with Flutter and Pixel Shaders
    25:36 Next Steps and Future Plans

  • @FilledStacks
    @FilledStacks ปีที่แล้ว +22

    Awesome talk! Super excited about this. Can't wait to start playing around with it and using it in production.

  • @wdestroier
    @wdestroier ปีที่แล้ว +55

    Flutter web with fast initial load would be a huge improvement 😮 Great talk Kevin!!

    • @amanverma6515
      @amanverma6515 ปีที่แล้ว +2

      Wasm takes time to load

    • @StevenAkinyemi
      @StevenAkinyemi ปีที่แล้ว

      @@amanverma6515 And js doesn't?

    • @causality5698
      @causality5698 ปีที่แล้ว +1

      @@StevenAkinyemi Browsers don't have to load the js runtime.
      For dart they do

    • @StevenAkinyemi
      @StevenAkinyemi ปีที่แล้ว

      @@causality5698 Well, that is a Dart problem not a wasm problem.

    • @causality5698
      @causality5698 ปีที่แล้ว +2

      @@StevenAkinyemi Thats true, though he probably meant dart compiled to wasm takes time to load.
      theres no solution other than embedding dart runtime in the browser

  • @obinnaokafor6252
    @obinnaokafor6252 ปีที่แล้ว +43

    Finally, async/ await has taken over the industry. Well done, C#

    • @shreyasjejurkar1233
      @shreyasjejurkar1233 ปีที่แล้ว

      There is nothing off about. It's great at least in c# which I am aware of.

    • @farrellraafi1301
      @farrellraafi1301 ปีที่แล้ว +2

      don't forget ES6... Even though C# does it first but it does not provide backward compatibility unlinke Babel Transpiled ES6 code

    • @obinnaokafor6252
      @obinnaokafor6252 ปีที่แล้ว +5

      @@farrellraafi1301 When it comes to backward compatibility. .NET / C# is the best in the industry. Incessant breaking change is not all that tolerated in the .NET/ C# world.

    • @rushslowly9450
      @rushslowly9450 2 หลายเดือนก่อน

      @@obinnaokafor6252 Java wants to speak a word with you

  • @luisround
    @luisround ปีที่แล้ว +3

    💙💙💙 Nice talk Kevin! Very excited about Dart!

  • @rebarius
    @rebarius ปีที่แล้ว

    Very good Talk! Thanks Kevin :)

  • @cepuofficial9025
    @cepuofficial9025 ปีที่แล้ว +7

    Good job, Kevin. I am pretty optimistic in Flutter's future on web platform. Maybe mobile devs will have another jobs soon as FE web devs

  • @r.pizzamonkey7379
    @r.pizzamonkey7379 ปีที่แล้ว +8

    This is very promising. I would love for the ability to call wasm code written in other languages too.

  • @user-ph3go3tl3h
    @user-ph3go3tl3h ปีที่แล้ว

    Well done

  • @HelloCodepur
    @HelloCodepur ปีที่แล้ว +8

    Great talk Kevin 🤘🏻

    • @kevmoo
      @kevmoo ปีที่แล้ว +1

      Thank you!

    • @marana.th4
      @marana.th4 ปีที่แล้ว +1

      CODEPURRRRRRRRRRRRRRRRRRRRRRRRRR

  • @philosophia5577
    @philosophia5577 4 หลายเดือนก่อน

    Amazing Talk Kevin... we hope the wasm gc work is completed soon and all the browsers adopt it to get Native Speed with Flutter Web.

  • @lagos6065
    @lagos6065 9 หลายเดือนก่อน

    very good job guys ! pro lang

  • @anotherjack
    @anotherjack ปีที่แล้ว +2

    Awesome stuff. Also, not often you hear someone pronounce Ubuntu correctly. Nice, Kevin!

  • @mikopiko
    @mikopiko ปีที่แล้ว +2

    Wouldn't this be a great opportunity to talk about Impeller to? The replacement for Skia.

  • @its_me_mahmud
    @its_me_mahmud ปีที่แล้ว +3

    💙💙💙💙💙

  • @dhrubrawat9316
    @dhrubrawat9316 ปีที่แล้ว

    great.

  • @ishaanmalhotra3008
    @ishaanmalhotra3008 ปีที่แล้ว

    I hope this materializes soon. I dont wanna be dipping my toe into javascript.

  • @ehsanhasin8092
    @ehsanhasin8092 ปีที่แล้ว

    great

  • @JasonJA88
    @JasonJA88 ปีที่แล้ว

    Cool...

  • @psclip3309
    @psclip3309 10 หลายเดือนก่อน

    and i find some UI framework for rust like slint and dioxus, its still new, i tried the app demo on web its super smooth

  • @marana.th4
    @marana.th4 ปีที่แล้ว +5

    something was wrong with the setter 1:19 , it's rather setting the privatized name to the public name instead of the value parameter

    • @kevmoo
      @kevmoo ปีที่แล้ว +4

      You are absolutely right! Good catch!

    • @marana.th4
      @marana.th4 ปีที่แล้ว

      @@kevmoo thanks 🙂🙏

  • @littlebearandchicken2077
    @littlebearandchicken2077 ปีที่แล้ว +33

    The average developer doesn't understand that this is a HUGE happening right now. WASM is a *very* important project going on right now. For a while it's been going strong but it really needed a big implementor to really pick up the trend. I hope that Flutter will be that implementor. If they get this to work, they should market the living h3ll out of it. Let the people know that new ground has been broken.

    • @yudhalandingkit
      @yudhalandingkit ปีที่แล้ว +2

      Ok so dart or flutter Will be better with wasm? Thank you😊

    • @lukasklingsbo3391
      @lukasklingsbo3391 ปีที่แล้ว +8

      @@yudhalandingkit not only Dart and Flutter (which it will speed up a lot), but once WASM is everywhere we don't need to have the pain of terribly dynamically typed languages like Javascript and Typescript for the web anymore.

    • @dinoscheidt
      @dinoscheidt ปีที่แล้ว +10

      The average developer cares about meeting accessibility requirements, leveraging the operation system and integrate with existing code. Replacing the work of thousands of browser and OS engineers of the DOM api with a canvas “just because WASM” with a niche programming Langauge, sounds idiotic for most. If I wanted to to that, I’d build my app with unity in C# for html5 and that way have at least some fancy flashy 3D like experiences to tap into. Nobody is going to be able to use the screen reader on their phone, but that’s expected with a macromedia flash like object on a canvas.

    • @_____case
      @_____case ปีที่แล้ว +4

      ​@@dinoscheidt All of this is very true, because most of the web infra is centered around the DOM. But in the future, that won't have to be the case. Each language ecosystem will fill the gaps left open by this transition over time. But yeah, it'll probably be 10 years before those ecosystems reach parity.
      Until then, anyone using Flutter can still target the DOM if they want to get those benefits for free.

    • @bibaswanbhawal8593
      @bibaswanbhawal8593 ปีที่แล้ว

      @@dinoscheidt flutter fully supports accessibility out of the box and offers the same cossitent accessiblity natively and in the web without any extra code

  • @pierce8308
    @pierce8308 ปีที่แล้ว +5

    Please give us Code Push in Flutter. I changed my projects from flutter to react native regardless of flutters superior developer experience and binary speed ONLY because RN codepush. Feature delivery and bug fixing is just so much simpler and better

    • @joshuanwokoye
      @joshuanwokoye ปีที่แล้ว

      There is a solution for that, although in development. Name is Shorebird

    • @prerakmann1418
      @prerakmann1418 ปีที่แล้ว +2

      Shorebird is working for this feature rn

    • @cepuofficial9025
      @cepuofficial9025 ปีที่แล้ว

      flutter team rejected this feature request. I think the reasons are pretty logical from their side

  • @jasonboyd782
    @jasonboyd782 ปีที่แล้ว +16

    Am I wrong in this assessment: Javascript led to more and more embedded native standards to support common "desktop" things in the browser. This includes the Canvas API, which is basically a wrapper around OS-native 2D and 3D graphics APIs. WebAssembly came along to allow something akin to a virtual machine running inside browsers, and now Dart and Flutter are using these layers to basically make the browser nothing more than a container for various layers of wrappers around native OS APIs, made standard by the pressures of "HTML5" to standardize these wrapper APIs.
    But at the end of the day, none of this is "web" anymore. It's just a very complex virtual machine comprised of an HTML5-compliant browser supporting Canvas, WebAssembly, HTTP, and so on. In leiu of the open source world we always deserved, we've simply open-sourced the application API and now everything is being implemented natively by browser vendors to make that API cross-platform.
    It's all very silly is my point.

    • @brandonzhang5808
      @brandonzhang5808 ปีที่แล้ว +5

      A prime example of what a product/market/business-driven environment leads to. A bit like evolution if you ask me, it is what it is.

    • @hwstar9416
      @hwstar9416 ปีที่แล้ว +9

      It always has been a VM to some extent

    • @dustinkrejci6142
      @dustinkrejci6142 ปีที่แล้ว +1

      following.

    • @quazar-omega
      @quazar-omega ปีที่แล้ว +4

      It does sound kind of silly, it's like convergent evolution, but I guess you might find value in being able to run certain apps without needing to actually install them on your system.
      Also it's worth noting that Flutter in trying to be cross platform naturally has to tackle the web as well, so if that means that they'll make apps very performant in a browser, I'd say it's a welcome side effect in the end.
      I can agree that now the web has really become unfocused, it's not about just sharing lightly styled documents over the internet anymore, as more and more use cases emerged with time, the direction was stirred into making web apps possible as well as many other things.
      If you're looking for a more minimal experience Gemini will probably be your best bet

    • @thiccboi6211
      @thiccboi6211 ปีที่แล้ว +6

      No its not silly. Adding more capabilities to the web is just necessary and it enables more and more complex experiences. There is no "pressure", just "need".

  • @stevenstark-com
    @stevenstark-com ปีที่แล้ว +4

    sounds like a fast way to being painted into a corner without any way out

  • @RVDriest
    @RVDriest ปีที่แล้ว +6

    Will there be a negative effect on SEO?

    • @bopon4090
      @bopon4090 ปีที่แล้ว +6

      I think there will be cause it's rendered on canvas which is not crawlable.

    • @puffin_000
      @puffin_000 ปีที่แล้ว +4

      Yes, definitely. Because bots can't detect the contents of webassembly applications.

  • @hassejansson
    @hassejansson ปีที่แล้ว +3

    #Blazor

  • @MatthiasPitscher
    @MatthiasPitscher ปีที่แล้ว +5

    so is this like Adobe Flash and actionscript?

    • @MatthiasPitscher
      @MatthiasPitscher ปีที่แล้ว +2

      or more like Java Applets?

    • @zzzyyyxxx
      @zzzyyyxxx ปีที่แล้ว +1

      Kind of but even more open, I don't have to use Java or action script necessarily, I can use whatever language I want that can compile to WASM, just as I can do when making a desktop application. Only now the user doesn't have to install a desktop app to use my application, they can simply link to it. It's all the benefits of web with the benefits of native performance.

    • @johnkost2514
      @johnkost2514 ปีที่แล้ว

      Old concepts renewed. Yes indeed. Flash runtime was based on ABC bytecodes. Java plugin used the JVM and it's bytecode. Microsoft had their thing called .. I forgot the name!

    • @raianmr2843
      @raianmr2843 ปีที่แล้ว

      Yeah, except improved and open-source.

  • @ElVerdaderoAbejorro
    @ElVerdaderoAbejorro 11 หลายเดือนก่อน

    19:39 "We eliminate the JavaScript interop layer. It's Wasm to Wasm." Been waiting for this for over a decade. JavaScript HAS to die.

    • @_____case
      @_____case 8 หลายเดือนก่อน

      That will take 50 years.

  • @shadowangel-ou6bg
    @shadowangel-ou6bg ปีที่แล้ว

    WASM really needs to be module based with it's own tree shaking. we see this with rust based web applications, performance outside firefox is also not that great.

  • @noninvasive_rectal_probe8990
    @noninvasive_rectal_probe8990 ปีที่แล้ว

    loved his skinny jeans :£

    • @kevmoo
      @kevmoo ปีที่แล้ว

      🥴

  • @danielduvana
    @danielduvana ปีที่แล้ว +3

    The wonderous app is cool, but really doesn’t feel native on iOS at least. The animations are laggy even though it’s using Impeller. Looking forward to even more performance improvements in this area. But this is all a bit off topic 😅

  • @saiphaneeshk.h.5482
    @saiphaneeshk.h.5482 ปีที่แล้ว +1

    This maybe an improvement when it comes to displaying 2D or 3D effects, but the problem is with normal static webpages which may not have complex UI styling or animations. It may not affect those who have a higher bandwidth and unlimited data, but that is not the case for everyone right? And there is also a negative side of SEO which is not existent in flutter web (you can use other things to replicate it but not natively).
    I guess it would be better if the chromium/browsers team add dart into the browsers itself as they were trying to do with Dartium which got closed unfortunately, not sure whether it would reduce some of the unrequired boilerplate to run the websites. But I'm sure it would make it faster for development time as HOT RELOAD maybe enabled for the WEB as there will be no need to compile the code using the dart2js as it is down now.
    But I guess in the end until everyone in the world will have access to better internet connectivity the loading time and SIZE really does matter.

    • @mcl7cdm
      @mcl7cdm 8 หลายเดือนก่อน

      We need to start making the difference between WebAPP(lication) and a WebSITE the later needs to be crawlable thus SEO friendly. The former is an application that you install just by visiting a url. You don't need your Slack app to be SEO friendly. That's my 2 cents.

  • @Tldrx
    @Tldrx ปีที่แล้ว +1

    hate the loud music at the beginning

  • @jondo7680
    @jondo7680 ปีที่แล้ว +14

    Wasm is great tech. Flutter seems to be interesting, and dart is a nice language except for the ";"

  • @MrAmG17
    @MrAmG17 ปีที่แล้ว +1

    Umm... Umm... Umm :D

    • @kevmoo
      @kevmoo ปีที่แล้ว +2

      Dude, I...um...know. 🤦

  • @StingSting844
    @StingSting844 ปีที่แล้ว +7

    WASM loading performance is not a valid metric. Its not meant for sites. Its meant for rich experiences!

  • @aymcorporation3456
    @aymcorporation3456 ปีที่แล้ว

    I still thought that flutter for web is a scam

  • @jamesr2408
    @jamesr2408 หลายเดือนก่อน

    Money makes the world go around. *What about Flutter-web-stripe support.* Without solving this gap, there is no way to hop into the Flutter-web development train, sorry.

  • @ck_naik
    @ck_naik ปีที่แล้ว +1

    😂 Microsoft openly mention Google, but why not Google doing the same.
    " Hopefully other browsers" :- Google don't just limit yourself to chrome

    • @kevmoo
      @kevmoo ปีที่แล้ว +6

      I said Chromium based browsers and Firefox. I think most folks know Edge is Chromium based, right?