WASM: Are we there yet? by Tyler van der Hoeven
Ethereum Denver·Mon, Oct 9, 2023, 12:00 AM
WebAssembly (WASM) has been proposed as an ideal smart contracts runtime going back as early as 2015. However, the EVM still reigns hard and receives most blockchain developers’ attention. In this fireside chat we will explore the benefits of Webassembly, the challenges in its adoption, and discuss opportunities for developers building on it.
Transcript
[Applause] all right good morning everyone my name is Tyler vanderhoven I'm from the Stellar development foundation I'm an ecosystem engineer and I'm joined here by my good friends colleagues from the AHA Labs if you'd like to introduce yourselves really quick hi I'm Chad ostrowski was at near for a while before starting aha Labs with Willem about a year ago yeah like you said I'm Willem and uh yeah I've been working with webassembly and the space since like 2017. yeah so we're decided to just take a kind of a minute out to talk about webassembly we're kind of in this evm versus webassembly we've got rust and all these different languages up against solidity and just wanted to take a minute to maybe have a discussion and talk about that for a minute these guys have been working with with rust and webassembly I'm an engineer a lot of times I spend myself in in the web working with JavaScript I've been learning rust but I wanted to take a minute to kind of just have this open discussion about why do we have to is there is there an advantage uh webassembly's been around for a while but solidity has also been around for a while so maybe just take a minute to from your own words discuss the the advantage or the significance of maybe having web assembly up over uh evm well before we get into it I'm curious in the audience how many people use the evm use solidity regularly all right so a quarter to a third of you how many people have used webassembly or use a blockchain that uses webassembly very few of you so maybe we should start by saying what webassembly is great idea Willem why don't you do that yeah so webassembly is a virtual machine like the evm I was originally designed to be a virtual machine you could run in your browser so you could compile C code down to the spike code and then run it in your browser um since then it's obviously grown outside the browser so the web and web is simply sort of a misnomer but uh it's a very low level virtual machine uh so like compared to like the Java virtual machine it's uh very Bare Bones but that means that it's very close to Machine level code and it can compile down or jit really easily um so yeah it's now been used for uh with near I think was one of the first to that's how I got involved in this space um and uh yeah so it lets you run more efficiently than say the evm because it's doesn't have as high level of abstraction as CVM can you maybe talk about that just a little bit more sure yeah I guess I also want to say like webassembly is being used by near by there's a some blockchains in the cosmos ecosystem use webassembly by using a plug-in called cosmosum by the way what do you think wasm let's see it let's see a show of hands for wasm versus wasm I want to do that wasm okay wasm oh no okay all right we got we got a few ASMR undecided yeah yes William really likes wasm because Webb uh assembly sounds more like as um anyway um cosm wasm doesn't sound as good so kazum wasm um Stellar is making new smart contract platform called sorobon that is hopefully launching its main net later this year that also uses wasm I I believe I don't know I know there are others I'm not sure I know Solana has like rust support but I don't know if it's using some subset of webassembly do you know no it's like a ebft so it's like this uh secure native component type situation so it's fast but safe nice and your colleague Tomer who was supposed to be doing this instead of you correct I wrote a great blog post about why they why you chose webassembly you all did a whole audit of different blockchain Technologies and decided on webassembly I would imagine that near did a similar thing back when they were picking which technology to use for their smart contract sandboxing for their smart contract platform so I guess maybe Willem you're nodding like you might know something about that I'm curious if you want to say why you think webassembly is a good fit for smart contracts well I mean it's it's like I said more low level and and you know runs more efficiently than the evm would in fact on near they've uh they have Aurora which is basically the evm as a smart contract on top of webassembly um and so yeah it just shows to show that it's a flexible and and ever improving technology compared to something more domain specific like the evm um yeah I think that's one of the one of the more interesting things to me particularly when you're talking about looking at technology as a whole and not isolating blockchain out by itself you have this opportunity with webassembly to grab a hold of innovators and um Engineers companies that don't care all about blockchain you're able to kind of borrow from their Innovation to pull it into a blockchain specific space so webassembly isn't only used for blockchain it's used for all kinds of different things and because it can compile from so many different languages anybody that's building out languages um you can you can pull those in and those Engineers are immediately able to just jump in and start writing smart contracts which is which is really cool and really powerful um when we're in a space like if you look at that small subset of tech that is blockchain it's like 95 99 evm so is that is that a problem like when you pick a um the less popular choice is that is that going to be a problem long term like who who actually wins here is it evm even though it may be more difficult to make it efficient and it is kind of domain specific kind of what are our thoughts there on picking a less popular but maybe technology as a whole more popular when we were talking about this yesterday we were discussing this and came up with the idea that right now the blockchain space the blockchain ecosystem at Large is maybe where the web was at in the mid 90s right and we're still all figuring it out there aren't there's no like MVC Ruby on Rails framework for building dapps yet everyone's still uh figuring out the basic building blocks that we need to make stuff work so saying it so I guess a way of framing your question is like maybe the evm has some flaws and we could talk more about those flaws too we didn't really say like why other than it's more domain specific we didn't say any other like drawbacks of the evm uh so maybe it's flawed but it's already so popular maybe it's it's like JavaScript right JavaScript it had its flaws it still beat out all the other programming languages for a long time and maybe like now with webassembly and browsers we can finally see other languages start competing with JavaScript but it was super dominant for a very long time is the evm already there have we already passed the JavaScript moment where it's so popular that it doesn't make sense to use something else um but if we think that we're sort of in the mid 90s if that's correct if that's a useful metaphor and we're all still figuring it out then the evm could be like Java right and like other things became much more popular than Java by the early odds certainly by the mid odds so that's kind of my take on this the evm solidity are in wide use within the blockchain ecosystem but the blockchain ecosystem as a fraction of web development the web development ecosystem is still tiny right so as more people come in as more apps start incorporating some blockchain elements will they use the evm will they need to or will there be better Alternatives will they use will they even use ethereum right to me that's still an open question yeah and I think when you're making that choice and starting out at some L1 from scratch um yeah I mean it's very attractive to use the evm because of all the tooling and the ecosystem and developers I mean it you don't have to reinvent the wheel um but there are other promising projects that are trying to say compile solidity down to webassembly so then you can have the best of uh both of those situations um but yeah no I I think long term the investment that you know big companies like Google and fastly and Shopify are putting into improving webassembly will make the long-term investment better yeah it's interesting to me like when you use the comparison of languages in the 90s up against blockchain like you your users didn't have to pay based on whether or not you chose a certain language but if you choose the wrong language now or you choose um kind of the wrong engine behind the scenes it's actually going to cost your users your your growth mechanics long term could be deeply affected in a way that okay if I choose Java or Flash or JavaScript or python like I'll make it work and it's my users won't have to actually make transaction costs for that it's a little bit different now and I think we need to think a little bit more deeply about like what what's the value of being a maxi on evm or like picking one of these languages we need to be like keeping in mind who are our users what are their costs what do they get what's the the actual effect for adoption for people kind of being onboarded into this using it behind the scenes are there actual cost notes it's more affected than it would have been choosing languages at least in my estimation we need to think pretty deeply about the the like long-term effects what's going to be the business costs of making these technical decisions because it's not exactly the same these aren't just languages they have actual financial implications further down the road do you think that the evm ends up costing more on average for users than webassembly I think so but it's more it's more a question of what's the rate of innovation right so if it costs too much the and that begins to affect your bottom line the engineers will make efforts to make it cheaper to bring it down but who has more Engineers the internet like the web at large rust Engineers webassembly Engineers people who aren't kind of in this subset of blockchain or just blockchain Engineers right evm Engineers so maybe it's a question of the does the evm kind of step outside of blockchain does solidity as a language step outside of blockchain and get like wide wide main usage adoption outside of just this this particular use case that would kind of be the I could see it happen on both sides but it seems to me the the safer bet is pick what the internet is using pick what the the industry the tech industry at large is is using yeah and like you know the right now you can use any language that compiles the web assembly and you know the they're adding uh you know new uh proposals to it that will allow you to have garbage collection which will let you have components so you can have you know components that are compiled in a different language be able to runtime link with your library or your your application and so I think eventually we'll see you know hopefully it'll be adapt but uh the uh package manager of all package managers who will let you you know pick a package and it'll have the types for your language and you won't need to know the implementation details of that and you know that I think that's going to be really powerful in bringing in people from outside of web3 who you know maybe would struggle with solidity in these at these languages that are and even rust right um so the sort of democratization and allowing people to take any of their um you know how and bring it to webassembly it if we were to kind of maybe um remove all of the competition put just blockchain in general as a solution is something that we believe is useful to the world however we choose to implement it I mean that's a question we can definitely ask what would kind of be your recommendation to developers Engineers people kind of looking out at the I like blockchain and I I'm interested in using it what should they be looking at what should they be measuring in the technology that they're that they're choosing what's like a good mental model to approach the the technology or the problem space I'm not sure I understand the question sorry go ahead like again if if you look you're trying to like I want to use blockchain for something you're going to get loads and loads and loads of the SEO from ethereum from solidity and so is that the is that the default choice is that the right choice to make is there articles are there Alternatives if you are looking at webassembly I don't want to make the Assumption the webassembly is the right choice but how do you approach kind of that problem space for yourself as you're looking at I believe this can solve problems in the world and I want to use it for that purpose kind of how do you approach that problem space that mental model of making choices on technology yeah I think a useful metaphor for me is kind of the evm might be like react where there's a huge number of developers a huge Community around it contributing you know packages that you can use and them there's a lot of tooling for it because of all of the the people all of the energy behind it all right but maybe react is not the best choice for the web anymore especially for the mobile web right so like what's the what's kind of upcoming what's next if I were trying to make a business right now and I were just trying to like make a product and get it in front of people react still makes a lot of sense because of all of the energy and Community behind it so maybe the evm does make sense for a lot of projects right but for people who want to be ahead of the curve and who have the energy and the expertise to navigate and explore the other options then I think things that I would be looking at is ease of building like ease of building it long term right and I think webassembly definitely excels there where there's support for other languages and support for more types right um so it's easier to build robust programs with things like rust that compile to webassembly versus solidity on the evm I would also be looking at things like cost of transactions on that blockchain how does storage work on that blockchain I feel like there are other things I'm not thinking of right now Willem do you have any thoughts there yeah I mean going back to that 90s metaphor it is if there is this polished uh technology that you can choose that has all the standards already and agreed upon way of deploying contracts and and upgrading contracts whereas on newer chains that are having sort of invented from scratch those might not exist so you know you have to sort of do more work on yourself and it might be risky in the short term because there might become this new standard and you don't uh you know adhere to it and so it's going to be you have some friction with maintaining and upgrading your your your you know your code so yeah I think if if you have that long-term Vision then I think webassembly is definitely the way to go yeah cool I agree I think again taking a look at the ecosystem out there the opportunity options that are out there and being willing to just look do some research do some reading find tools that make sense um find chains for the use cases that you have and some of us are like we're just engineers and we want to play with stuff and there's nothing wrong with that but have a nice wide breadth of experience and knowledge I think one of the things that excites me about webassembly and rust is like regardless of where blockchain goes I know Russ now and there's plenty of companies that are implementing using rusts that I can take and go and use that knowledge anywhere else same thing with webassembly I can use it on the web I can also use it in backend applications I can begin to onboard Engineers that know nothing about the language I know but they know their language they can compile down to webassembly and I can begin to implement those technology webassembly is just an amazing Innovative language to kind of pull together Engineers from all kinds of interests and use cases applications and kind of be able to borrow from them it's quite interesting in that sense um so yeah I think again webassembly a phenomenal option to explore to begin to to think about do some research on play around with it um my recommendation is is definitely rust on top of that but I know we've also got I mean solidity they've got compilers from solidity down to webassembly as well so the opportunity is quite fantastic uh looking forward to seeing where it goes kind of keep an open mind give it a chance and uh and yeah thank you all very much yeah thanks we'll see y'all [Applause]
Automatic transcript — names and jargon may be misspelled.