WASM App

Hi. I’m not sure if this is the best place to ask this, but I’m developing a WASM client-server app and saw something about cloudflare being able to serve that out pretty well and cheap. Can someone tell me if that’s what the workers do? I have no experience with cloudflare and the website is using a lot of terms I’ve never been exposed to and can’t make sense of it.
8 Replies
Hard@Work
Hard@Work3mo ago
Just to confirm I have the right idea, do you mean that you are running WASM on both the client and the server, right?
bpence
bpenceOP3mo ago
Yes that’s correct. Just a standard webassembly solution in VS2022 with client, server, shared projects inside
Hard@Work
Hard@Work3mo ago
What runtime is the server-side code expecting? There isn't really a standard around WASM server runtimes yet, so something that runs on Workers might not run on Fermyon, or Docker WASM
bpence
bpenceOP3mo ago
Tbh, I’m not sure what you mean. This is my first time building a wasm app. Thought I’d try it and I kinda like it. My goal was just to deploy it on an Ubuntu server to serve everything. It’s been over 20 years since I’ve really done a commercial coding project so kinda catching up to modern times
Hard@Work
Hard@Work3mo ago
Taking a guess, since you mentioned VS2022, I'm going to assume you are using Blazor? If so, unfortunately Blazor Server doesn't support running on Workers at the moment. If you compile it entirely as a client-side app, you can deploy it to Workers
bpence
bpenceOP3mo ago
Ahh ok. Yes it is Blazor for sure. API backend going to psql db. Could the client side alone run on workers or none of it will because of blazor?
Hard@Work
Hard@Work3mo ago
None of it, unfortunately. The best you can do is serve the frontend from Workers. Any backend work would have to be in a language that is more supported by Workers
bpence
bpenceOP3mo ago
Would it be worth it to redo it in something compatible? The little I have been able to gather about workers seems pretty cool, but when I say little, I mean very very little. Seems VPS or colo is about my only options if workers isn’t going to work out.

Did you find this page helpful?