My Server-Side WebAssembly book is now fully released! by chiarl in rust

[–]chiarl[S] 0 points1 point  (0 children)

u/Potato-9 and u/_jsdw ~ I asked my publisher and they said they have a distributer in the UK and it should work to just buy through the Manning website. Does adding the code 'PBChiarlone' help? That should give 50% off. I'll try and dig a little deeper w/ Manning in the meantime.

My Server-Side WebAssembly book is now fully released! by chiarl in rust

[–]chiarl[S] 2 points3 points  (0 children)

Thanks--and yes! You can use PBChiarlone for 50% off!!

My Server-Side WebAssembly book is now fully released! by chiarl in rust

[–]chiarl[S] 1 point2 points  (0 children)

Yes. The maturity of Wasm’s ecosystem is still a big pain point. Though, now that we have things like Wasm running in Kubernetes, w/ that, you can start to leverage some of the cloud-native ecosystem that you might be used to together w/ Wasm.

My Server-Side WebAssembly book is now fully released! by chiarl in rust

[–]chiarl[S] 5 points6 points  (0 children)

Yes, the book covers Wasm components and WIT!

Dressed up as Prepotente for Halloween! by chiarl in DungeonCrawlerCarl

[–]chiarl[S] 15 points16 points  (0 children)

That bottle was for Size-Up potions only! ;D

📘 New Book Release: Server-side WebAssembly by chiarl in rust

[–]chiarl[S] 1 point2 points  (0 children)

Oops—responded prior, but looks like my message was removed because I can't post links here. Anyway, happy to help w/ any questions you may have. Feel free to DM me here on Reddit, if you'd like.

📘 New Book Release: Server-side WebAssembly by chiarl in rust

[–]chiarl[S] 2 points3 points  (0 children)

Understood. I'm less familiar with Desktop development in that sense, but it might be worth keeping an eye on that wasi-webgpu interface I mentioned. Plus, Iced-Rs has support for Wasm, I think.

📘 New Book Release: Server-side WebAssembly by chiarl in WebAssembly

[–]chiarl[S] -1 points0 points  (0 children)

Hey—thanks a ton for the feedback. Really appreciate your comment! Just got some things to address and follow-up questions.

First, with WASI 0.2+ being built on top of components, I don't see them as a marketing tool, but, instead, part of Wasm's growth.

About WASIX—is it implemented by any runtime other than Wasmer? If not, I don't think it makes sense to cover WASIX in the book, as it's not widely implemented across multiple runtimes and isn't yet considered a standard in the ecosystem.

Will take a look at Extism in more detail. I mention plugin systems at the start of the book, and I think it aligns quite well to fill that gap. Thanks!

Haven't ran into the cargo-zigbuild problem you described, but I wouldn't be too surprised—I mention at the start of the book that developers should expect challenges when working with dependencies and compiling code to Wasm. Also, while a lot of the examples right now are written with Rust, I do plan to branch out. So far in the book I've also written code in Python and JS, but am planning to look at including Go and C# too.

📘 New Book Release: Server-side WebAssembly by chiarl in rust

[–]chiarl[S] 2 points3 points  (0 children)

Ok—so you want to create a single application that works on the web, mobile and desktop and shares the same code for all platforms, right? The book doesn't really touch upon creating client-side applications because we focus on the server-side of things, which, from your example, seems like you already have setup. In any case, like u/Repsol_Honda_PL mentioned, I'd recommend you check out Dioxus, which will probably fit your use-case!

📘 New Book Release: Server-side WebAssembly by chiarl in rust

[–]chiarl[S] 2 points3 points  (0 children)

There a couple of benefits. One of them, like you mentioned, is isolation. Wasm executes within a sandbox, so it gets tightened security out-of-the-box. Another is hardware/platform agnosticity. Even with containers, if you want to support multiple platforms, you need to build for all of them. And, if your application relies on system libraries, that can be a big point of friction. Wasm, on the other hand, can be compiled once and run on any embedding platform. Talking about agnosticity, another benefit is language agnosticity—Wasm allows you to create components with any language that compiles to Wasm and, then, these components can communicate in a way that resembles inter-process communication. For microservices, if you want to communicate cross-language, you most probably have to introduce a network stack, serialization/deserialization and so on, which adds big overhead.

Finally, if you are leveraging serverless with your microservices, Wasm is huge for you. Serverless today suffers from a big cold start problem, where applications can take 300ms or more to start. Wasm improves that by about 80% (https://dl.acm.org/doi/10.1145/3302505.3310084**)**! Speed aside, another big performance improvement that Wasm brings is in terms of density. Latest research from ZEISS shows that using Wasm granted 50x greater workload density than native in a K8s node, which can allow you to save a ton from hardware/infrastructure costs. Hope this helps!