Yes and no. Wasm has no “standard library” so if you wanted to use Dates, your wasm would need to have its own implemation bundled for when the user visits the page. Ditto for everything else including string support! As you can imagine having to ship all this basic functionality can bloat the wasm and slow page loads.
You also can’t fully escape JS, as the only way wasm can interact with the page & browser are through the JS functions you write and make available to your wasm. I suppose you could take advantage of this to not have to ship your own standard library & use the JS Date implementation, but at that point why not just use JS?
Wasm has strengths but it’s not suitable for replacing JS for everyday websites.
There’s wasm if you need to target browsers.
Yes and no. Wasm has no “standard library” so if you wanted to use Dates, your wasm would need to have its own implemation bundled for when the user visits the page. Ditto for everything else including string support! As you can imagine having to ship all this basic functionality can bloat the wasm and slow page loads.
You also can’t fully escape JS, as the only way wasm can interact with the page & browser are through the JS functions you write and make available to your wasm. I suppose you could take advantage of this to not have to ship your own standard library & use the JS Date implementation, but at that point why not just use JS?
Wasm has strengths but it’s not suitable for replacing JS for everyday websites.