WebAssembly: A new development paradigm for the web

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 126

  • @ChromeDevs
    @ChromeDevs  Год назад +4

    Want to learn more about what's new for the web? Check out the Web Keynote at #GoolgeIO → goo.gle/IO23_webkey_pin

  • @ben6
    @ben6 Год назад +44

    Ahh, Wasm and JS will share memory. It would be good hear more about how race conditions are avoided.

    • @VincentPride1986
      @VincentPride1986 Год назад +8

      Just write a good code and race conditions will be avoided

    • @Joshua-dc4un
      @Joshua-dc4un Год назад +22

      ​@@VincentPride1986 just imagine creating a platform feature that requires the developer to write "good" code for it to work... it has always worked out well, right? 😂

    • @VincentPride1986
      @VincentPride1986 Год назад

      @@Joshua-dc4un a man can only dream... Anyways, let's wait for LLMs to replace low level programming in a few years

    • @mAcCoLo666
      @mAcCoLo666 Год назад +13

      Why would you have race conditions by just sharing memory? Your run-of-the-mill program already shares memory with the rest of your computer programs...

    • @perplexedmoth
      @perplexedmoth Год назад +4

      There is already SharedArrayBuffer supported in all browsers which allows you to share memory. The other, possibly bigger, issue with sharing memory is the object memory layout difference between that of JS, and the language that uses WASM. Accessing the same objects from both languages requires a language-agnostic memory layout, or pay the penalty of serialization/deserialization.
      Regarding the comment on race conditions, that doesn't make sense, since there's no multi-threading support, and hence there's no "race condition"s as I understand it to mean. If you mean just programmer errors stemming from mutating objects through multiple scopes, that can still happen using JS only.

  • @d-o-n-u-t
    @d-o-n-u-t Год назад +48

    I think the biggest thing holding WASM back is its reliance on the JS namespace to access and manipulate the DOM. If there were some way to do it natively, without having to call into JS, I think WASM could be much bigger, and much faster. Interfacing from WASM to JS to the JS engine to the UI takes time - would be nice if there was some API exposed that let you skip the middleman.

    • @walrider7374
      @walrider7374 Год назад

      JS needs to die, it has been a needed evil for far too long

    • @Yous0147
      @Yous0147 Год назад +15

      This is the one thing I want from WASM. Being able to interact with the DOM would be a gamechanger for sure, and I genuinely hope it's in the works.

    • @thomasnattestad2450
      @thomasnattestad2450 Год назад +13

      We actually looked heavily into this and you might be surprised to hear that the interface from JS to wasm is not heavily impacting performance. The only thing that really takes time is converting from linear memory into strings for API calls and this is going away with the new stringRef proposal. JS isn't slowing down wasm.

    • @Yous0147
      @Yous0147 Год назад +9

      @@thomasnattestad2450 That's good to know but I think the real reason most people want a direct API is moreso because they want to skip that glue code setup and use whatever language WASM supports to manipulate the DOM directly. The added bonus if that is that you then won't need to cross communicate between languages which on all accounts would be simpler and faster.

    • @thomasnattestad2450
      @thomasnattestad2450 Год назад +4

      @@Yous0147 Yeah, I definitely appreciate that the glue code can be cumbersome to set up. We've considered devtools / tooling changes to hide that more but it's a tough decision since sometimes you will want to debug those connections. The performance impact of communication between languages is the part that should be removed with stringRef (at least for string based API calls, which is most web APIs)

  • @bashorov
    @bashorov Год назад +12

    If you have any questions about Kotlin/Wasm or Wasm GC, don't hesitate to ask below.

    • @jakerunzer
      @jakerunzer Год назад

      Is there any information on when Wasm GC will be available? Or how to use it currently?
      Also, how will Wasm GC work in non-browser environments such as wasmtime?
      It looks awesome though! Looking forward to using it :D

    • @bashorov
      @bashorov Год назад +2

      @@jakerunzer standalone VMs, like wasmtime and WasmEdge recently started implementing GC proposal

    • @LEDsellers
      @LEDsellers Год назад +2

      If there any possibility that a JS codebase (client side) can be compiled to WASM and be run on the desktop as an alternative to electron? Would this JS compiled wasm app be multithreaded and no longer be single threaded?

    • @adsick_ua
      @adsick_ua Год назад

      Hello, what does Wasm GC means for languages that do not use GC? like Rust for example. Will it improve memory management and perf of calling into DOM/WebGPU?

    • @bashorov
      @bashorov Год назад

      ​@@adsick_ua those languages can continue using linear memory and ignore new things introduced by GC proposal. The proposal will not help with memory management nor browser APIs. They can use reference types to simplify interop with an external world, maybe it will help a bit with some runtime overheads.

  • @StefanGoldener
    @StefanGoldener Год назад +29

    So what's the better cross-platform development stack? DART/FLUTTER or KOTLIN/JETPACK COMPOSE? Kotlin seems still the most popular at Google (amount of Development/News). Furthermore, for new Projects with the new WEB capability, Kotlin can do what Flutter already could do while keeping the existing codebase. So there is no need for Flutter anymore 🤔. Would be great if Google could clear this up a bit so choices on which language/framework to use in long-term cross-platform development/new projects could be made easier.

    • @_umutyilmaz
      @_umutyilmaz Год назад +6

      I agree that Google should decide about the better long-term option, and continue investing in it. It should be Compose imho.

    • @RomanTchekashov
      @RomanTchekashov Год назад +10

      With Dart+Flutter you can write UI logic once but with Kotlin KMM you can reuse only bussiness logic. So with Dart+Flutter you can create multiplatform apps faster.

    • @Mzulfreaky
      @Mzulfreaky Год назад +7

      For me, more options are better

    • @walrider7374
      @walrider7374 Год назад +9

      I think Flutter UI is far better than Compose...
      But man, Dart is ugly as hell... once you taste the sweet of Kotlin, Dart taste like old Java

    • @RomanTchekashov
      @RomanTchekashov Год назад +2

      @@walrider7374 I agree with you. I don't know why google engineers cannot develop language which developers gonna like;

  • @SamSiah-tn5pb
    @SamSiah-tn5pb 8 месяцев назад

    @Thank you sir ☺️🙏🏻🇮🇩

  • @IlyaIzr
    @IlyaIzr Год назад +1

    So, if you're web dev - you might get new faster libraries
    If you're not web dev - you can extend your app to the web via WA

  • @coldtech06
    @coldtech06 Год назад +6

    So I no longer need to copy buffers back and forth if I use wasm GC? huge if true, unfortunaltelly I could not find any simple demo to play arround with

    • @MirosawSiwecki
      @MirosawSiwecki 6 месяцев назад

      In C# Blazor webassembly its the fourth year you dont need it

  • @nested9301
    @nested9301 Год назад +4

    What is the best language to choose for wasm ? Also i hope that the react ecosystem and architecture are not forgotten

    • @kenneth_romero
      @kenneth_romero Год назад +4

      currently I think Rust has the best support, but Rust is a tough language to learn. Kotlin is pretty nice since you can also code for Android and Apple within the same code. But any language you are comfortable in that is able to compile into web assembly is all you need. Though I heard debugging webassembly is still pretty tough and the debugging tools are not that fleshed out yet.

  • @muhamedkarajic
    @muhamedkarajic Год назад +1

    Truly amazing!

  • @gzoechi
    @gzoechi Год назад +10

    Rust works great with WASM in the browser (and backend)

  • @FlutterShipp
    @FlutterShipp 8 месяцев назад +1

    ❤‍🔥❤‍🔥❤‍🔥❤‍🔥

  • @guai9632
    @guai9632 Год назад

    I want wasm everywhere. an os with wasm as first-class or even only way to distribute software would be great.

  • @Vardiak
    @Vardiak Год назад +3

    "with no store getting in the way, and no revenue split affecting your profitability" 21:30 🤔

    • @hit_the_luddy
      @hit_the_luddy Год назад +1

      bro forgot he works for the company taking that split

  • @GillyTech
    @GillyTech Год назад +10

    Presentations like this make me feel like Google has a box of generic developers they can Mr. Potato Head up and put in front of a camera and read the script. As genuine as a car salesman.

    • @autohmae
      @autohmae Год назад +6

      In the current age, you have to wonder: is it AI-generated ?

  • @georgiatechmaniac
    @georgiatechmaniac Год назад

    Nice Pingu at the end!

  • @bernardosoccal1981
    @bernardosoccal1981 Год назад +5

    Blazor hype!

  • @juan-ramonsanchis-alberich2509

    EXCELLENT PRESENTATON. VERY VALUABLE. CONGRATS.

  • @thats-no-moon
    @thats-no-moon Год назад +1

    This is wild

  • @avi12
    @avi12 Год назад

    1:28 I'm wondering why Google Earth is not listed

  • @amlivinginhell
    @amlivinginhell Год назад

    is wasm used only to compile codes from other languages to wasm?

  • @activewire-web5710
    @activewire-web5710 11 месяцев назад

    Why Rust was not mentioned?

  • @DishantPatel-u2f
    @DishantPatel-u2f Год назад

    Is webassembly supported in android system webview? and other mobile platform webview? like flutter webview and android webview devtool

  • @DavidAlsh
    @DavidAlsh Год назад +1

    Would love it if threads were not restricted to same-origin opener and embedder applications as that basically disables any capacity for third party integrations - plus you can't add those headers easily with simple web infrastructure like an S3 website, GitHub pages site - etc
    Looking forward to the day I can write my application entirely in Rust and not thunk everything through JavaScript!

  • @justmichael1
    @justmichael1 Год назад

    webp-hero does not use WASM as per their documentation on npmjs

  • @klafbang
    @klafbang Год назад +2

    Very cool. You've invented Java applets.

  • @DinoFancellu
    @DinoFancellu Год назад +2

    What's the status of Java+WASM?

    • @wuxxy
      @wuxxy Год назад +9

      Why would anyone want to use Java in 2023?

    • @cryMoreLoL
      @cryMoreLoL Год назад +9

      @@wuxxy Seriously! The only reason why it still exists is because of legacy code. No one is thinking "I'm going to built this new app in Java!" Kotlin would make more sense, but Java? 🤦‍♂

    • @walrider7374
      @walrider7374 Год назад +3

      Java?

    • @hetaeramancer
      @hetaeramancer Год назад

      kotlin is not a superset of java, you can be perfectly fine with using java wherever you use kotlin @@cryMoreLoL

  • @krishanakumar490
    @krishanakumar490 Год назад

    Can I use your videos on my RUclips channel if I want.

  • @jobiej7416
    @jobiej7416 Год назад

    Kmm on the web is interesting.

  • @ck_naik
    @ck_naik Год назад +2

    They talked about rust c c++ even Swift but not c# 😅 shows how much they hate. Hopefully it will change

    • @thomasnattestad2450
      @thomasnattestad2450 Год назад +5

      We love C# and Blazor! We work actively with that team and they have a great experience. Honestly the only reason we didn't cover it is because the team does a killer job already with talks and documentation

    • @ck_naik
      @ck_naik Год назад

      @@thomasnattestad2450 But still you should mention them atleast once

    • @thomasnattestad2450
      @thomasnattestad2450 Год назад +3

      @@ck_naik I do mention that there are many other languages adding support. In an earlier draft I did rattle off the languages but there were just so many and I felt guilty leaving any single one out so I went with the generic coverage. Fair complaint tho :)

    • @ck_naik
      @ck_naik Год назад

      @@thomasnattestad2450 thanks 🙏 Great talk though

  • @rammrras9683
    @rammrras9683 Год назад

    I don't understand if the end result is HTML or just a cavans rendered ?

    • @HybridLizard_com
      @HybridLizard_com Год назад +2

      In short it is about fast data computation. What data you compute is up to you and you can exchange it with JS code e.g. to render on canvas, but also to handle some data not related to graphics processing. It is not about DOM manipulation (html elements, its attributes etc.)

  • @laughingvampire7555
    @laughingvampire7555 Год назад

    is this the famous Thom who made JDSL?

  • @bababert8488
    @bababert8488 Год назад +3

    The places where JavaScript isn't sufficient? So everywhere

  • @Ahmarth
    @Ahmarth Год назад +4

    Uff, doing Rust dirty, saying it cannot keep track of its own memory :D

    • @dmitriidemenev5258
      @dmitriidemenev5258 Год назад

      You do .forget() because you transfer ownership of closure to JavaScript engine.

  • @davidlearnforus
    @davidlearnforus Год назад

    I know its difficult but please someone use this for python web

  • @yapet
    @yapet Год назад +9

    Jetpack compose on web… dies of canvas 💀. This is flutter all over again

  • @nested9301
    @nested9301 Год назад +1

    See u 15years later when wasm will be production readyy

  • @gregdee9085
    @gregdee9085 11 месяцев назад +3

    Ahhh leave it to these yoyos to bring in those crap bloated languages to WASM, there's a reason C++/C is used to do all the real stuff....

    • @josiahparry
      @josiahparry 7 месяцев назад +1

      I’m only upvoting this because of the term “yo-yo” cracked me up.

  • @melveric1
    @melveric1 Год назад

    The language about managing memory is quite misleading, but this video is about advertising that google‘s runtime memory managed languages finally work in Washington too, so this must be assumed.

  • @_sonatard2568
    @_sonatard2568 Год назад +6

    How does WebAssembly render UI in Chrome?

  • @wickedtorpedo75
    @wickedtorpedo75 Год назад

    кто шарит будь добры скажите пожалуйста (я чет особо не хочу углублять в эту тему просто зашел сюда не на роком), если коммпилированный код flutter/kotlin на web assembly в 2 раза быстрее чем компиляция на js (16:13) то почему вообще компилировать код на js, почему все компилирует на js или есть подводные камни (необходимость переписать в какой то части код)?

  • @andreacfromtheapp
    @andreacfromtheapp 2 месяца назад

    seriously???? C++ instead of Rust? byyyyeeee

  • @foobar3770
    @foobar3770 Год назад

    Whoever said that Rust is an Alloc/free language has no clue about the borrow checker.

  • @pablovaldes6022
    @pablovaldes6022 Год назад +4

    👀 bye bye JS 😢

    • @mzg147
      @mzg147 Год назад +12

      👀 bye bye JS 😁

    • @DJenriqez
      @DJenriqez Год назад +12

      yeah, I'm listening this for 5 years.... it was always about community, frameworks, libraries, exampels, tutorials, never about technology itself

    • @ryanleemartin7758
      @ryanleemartin7758 Год назад +2

      @@DJenriqez I mostly agree but in this case I think it it's also about the technology.

    • @LEDsellers
      @LEDsellers Год назад +2

      can’t JS also now compile to WA?

    • @pablovaldes6022
      @pablovaldes6022 Год назад

      @@LEDsellers I believe so, that's right 🙌🏻

  • @MultiDringus
    @MultiDringus Год назад

    EggheadAssembly