Тёмный

WebAssembly: A new development paradigm for the web 

Chrome for Developers
Подписаться 754 тыс.
Просмотров 69 тыс.
50% 1

WebAssembly (Wasm) is a low level, high-performance binary format for the web, which can be compiled from languages such as C++, Swift, Dart, & Kotlin. In this talk we’ll showcase new developments in language support, usability, and increased performance. We’ll also show you how to get started quickly yourself!
Resources:
AutoCAD blog → goo.gle/3LtWASX
Figma blog → goo.gle/3VtzekR
PS blog → goo.gle/3nsglSU
Speakers: Thomas Nattestad, Vivek Sekhar
Watch more:
Watch all the Technical Sessions from Google I/O 2023 → goo.gle/IO23_sessions
Watch more Web Sessions → goo.gle/IO23_web
All Google I/O 2023 Sessions → goo.gle/IO23_all
Subscribe to Google Chrome Developers → goo.gle/ChromeDevs
#GoogleIO

Наука

Опубликовано:

 

9 май 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 124   
@ChromeDevs
@ChromeDevs Год назад
Want to learn more about what's new for the web? Check out the Web Keynote at #GoolgeIO → goo.gle/IO23_webkey_pin
@muhamedkarajic
@muhamedkarajic Год назад
Truly amazing!
@d-o-n-u-t
@d-o-n-u-t Год назад
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 Год назад
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 Год назад
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 Год назад
@@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 Год назад
@@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)
@ben6
@ben6 Год назад
Ahh, Wasm and JS will share memory. It would be good hear more about how race conditions are avoided.
@VincentPride1986
@VincentPride1986 Год назад
Just write a good code and race conditions will be avoided
@Joshua-dc4un
@Joshua-dc4un Год назад
​@@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 Год назад
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 Год назад
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.
@SamSiah-tn5pb
@SamSiah-tn5pb 3 месяца назад
@Thank you sir ☺️🙏🏻🇮🇩
@bashorov
@bashorov Год назад
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 Год назад
@@jakerunzer standalone VMs, like wasmtime and WasmEdge recently started implementing GC proposal
@LEDsellers
@LEDsellers Год назад
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.
@amlivinginhell
@amlivinginhell 10 месяцев назад
is wasm used only to compile codes from other languages to wasm?
@mrmoon18
@mrmoon18 Год назад
Nice Pingu at the end!
@cold_ultra
@cold_ultra Год назад
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 Месяц назад
In C# Blazor webassembly its the fourth year you dont need it
@thats-no-moon
@thats-no-moon Год назад
This is wild
@guai9632
@guai9632 10 месяцев назад
I want wasm everywhere. an os with wasm as first-class or even only way to distribute software would be great.
@StefanGoldener
@StefanGoldener Год назад
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 Год назад
I agree that Google should decide about the better long-term option, and continue investing in it. It should be Compose imho.
@RomanTchekashov
@RomanTchekashov Год назад
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 Год назад
For me, more options are better
@walrider7374
@walrider7374 Год назад
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 Год назад
@@walrider7374 I agree with you. I don't know why google engineers cannot develop language which developers gonna like;
@gzoechi
@gzoechi Год назад
Rust works great with WASM in the browser (and backend)
@amlivinginhell
@amlivinginhell 10 месяцев назад
can you share few examples of this?
@IlyaIzr
@IlyaIzr Год назад
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
@avi12
@avi12 Год назад
1:28 I'm wondering why Google Earth is not listed
@nested9301
@nested9301 Год назад
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 Год назад
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.
@user-gy1hb1cq8x
@user-gy1hb1cq8x Год назад
Is webassembly supported in android system webview? and other mobile platform webview? like flutter webview and android webview devtool
@justmichael1
@justmichael1 Год назад
webp-hero does not use WASM as per their documentation on npmjs
@FlutterShipp
@FlutterShipp 3 месяца назад
❤‍🔥❤‍🔥❤‍🔥❤‍🔥
@juan-ramonsanchis-alberich2509
@juan-ramonsanchis-alberich2509 8 месяцев назад
EXCELLENT PRESENTATON. VERY VALUABLE. CONGRATS.
@hasiiblive
@hasiiblive 4 дня назад
informative
@DavidAlsh
@DavidAlsh Год назад
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!
@_sonatard2568
@_sonatard2568 Год назад
How does WebAssembly render UI in Chrome?
@alexander3293
@alexander3293 Год назад
by using javascript
@farrellraafi1301
@farrellraafi1301 Год назад
@@alexander3293 or using canvas
@alexander3293
@alexander3293 Год назад
@@farrellraafi1301 yes but its sill using javascript wrappers that call into the canvas api
@mehoprelivoda
@mehoprelivoda Год назад
its not
@jobiej7416
@jobiej7416 Год назад
Kmm on the web is interesting.
@bernardosoccal1981
@bernardosoccal1981 Год назад
Blazor hype!
@rammrras9683
@rammrras9683 Год назад
I don't understand if the end result is HTML or just a cavans rendered ?
@HybridLizard_com
@HybridLizard_com Год назад
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.)
@Vardiak
@Vardiak Год назад
"with no store getting in the way, and no revenue split affecting your profitability" 21:30 🤔
@zohaib9381
@zohaib9381 Год назад
bro forgot he works for the company taking that split
@activewire-web5710
@activewire-web5710 7 месяцев назад
Why Rust was not mentioned?
@krishanakumar490
@krishanakumar490 Год назад
Can I use your videos on my RU-vid channel if I want.
@DinoFancellu
@DinoFancellu Год назад
What's the status of Java+WASM?
@wuxxy
@wuxxy Год назад
Why would anyone want to use Java in 2023?
@cryMoreLoL
@cryMoreLoL Год назад
@@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 Год назад
Java?
@makara2711
@makara2711 8 месяцев назад
kotlin is not a superset of java, you can be perfectly fine with using java wherever you use kotlin @@cryMoreLoL
@klafbang
@klafbang Год назад
Very cool. You've invented Java applets.
@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 10 месяцев назад
In the current age, you have to wonder: is it AI-generated ?
@davidlearnforus
@davidlearnforus Год назад
I know its difficult but please someone use this for python web
@laughingvampire7555
@laughingvampire7555 Год назад
is this the famous Thom who made JDSL?
@ck_naik
@ck_naik Год назад
They talked about rust c c++ even Swift but not c# 😅 shows how much they hate. Hopefully it will change
@thomasnattestad2450
@thomasnattestad2450 Год назад
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 Год назад
@@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
@bababert8488
@bababert8488 Год назад
The places where JavaScript isn't sufficient? So everywhere
@wickedtorpedo75
@wickedtorpedo75 7 месяцев назад
кто шарит будь добры скажите пожалуйста (я чет особо не хочу углублять в эту тему просто зашел сюда не на роком), если коммпилированный код flutter/kotlin на web assembly в 2 раза быстрее чем компиляция на js (16:13) то почему вообще компилировать код на js, почему все компилирует на js или есть подводные камни (необходимость переписать в какой то части код)?
@nested9301
@nested9301 Год назад
See u 15years later when wasm will be production readyy
@Ahmarth
@Ahmarth Год назад
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.
@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.
@yapet
@yapet Год назад
Jetpack compose on web… dies of canvas 💀. This is flutter all over again
@gregdee9085
@gregdee9085 6 месяцев назад
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 3 месяца назад
I’m only upvoting this because of the term “yo-yo” cracked me up.
@foobar3770
@foobar3770 Год назад
Whoever said that Rust is an Alloc/free language has no clue about the borrow checker.
@MultiDringus
@MultiDringus Год назад
EggheadAssembly
@pablovaldes6022
@pablovaldes6022 Год назад
👀 bye bye JS 😢
@mzg147
@mzg147 Год назад
👀 bye bye JS 😁
@DJenriqez
@DJenriqez Год назад
yeah, I'm listening this for 5 years.... it was always about community, frameworks, libraries, exampels, tutorials, never about technology itself
@ryanleemartin7758
@ryanleemartin7758 Год назад
@@DJenriqez I mostly agree but in this case I think it it's also about the technology.
@LEDsellers
@LEDsellers Год назад
can’t JS also now compile to WA?
@pablovaldes6022
@pablovaldes6022 Год назад
@@LEDsellers I believe so, that's right 🙌🏻
Далее
WebAssembly (WASM) vs. Docker - Our Expert Analysis
19:53
🤯 #funny
00:20
Просмотров 968 тыс.
ОСКАР И ДЖОНИ БРОСИЛИ НАС 😭
01:00
An introduction to WebAssembly
25:23
Просмотров 187 тыс.
Your web app but good: Aaron Boodman (Local-First Conf)
19:36
Learn passkeys for simpler and safer sign-in
14:55
Просмотров 24 тыс.
98% Cloud Cost Saved By Writing Our Own Database
21:45
Просмотров 315 тыс.
WebAssembly for Web Developers (Google I/O ’19)
39:56
Подключил AirPods к Xbox
0:45
Просмотров 23 тыс.