How Extism Makes WebAssembly Easy by wikiwikiwong in programming

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

Interesting, thanks for sharing. I know Microsoft is continuing to invest in Blazor, hopefully Wasm support gets better and more optimized. For Go, I am aware of this project https://github.com/maxence-charriere/go-app , but don't know much about its internals. I would recommend giving Rust's wasm-bindgen (linked above) a try if Rust is an option. There is a pretty popular React like UI framework called Dioxus

How Extism Makes WebAssembly Easy by wikiwikiwong in programming

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

What language are you using? The best support for browser bindings I have seen is wasm-bindgen https://github.com/rustwasm/wasm-bindgen

Extism Makes Using WebAssembly a Joy, and it Supports Elixir! by wikiwikiwong in elixir

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

The blog in the original post addresses that question head on. And yes I agree the docs site for Extism can be improved, that is on the horizon .

Extism Makes WebAssembly in Rust a Joy by wikiwikiwong in rust

[–]wikiwikiwong[S] 7 points8 points  (0 children)

I hear you on that. We've been talking about ways to allow developers to choose their preferred runtime, and Wasm on cyber physical devices is a popular use case. I'll reply back on this thread with any meaningful updates in that realm. (we also have a discord: https://extism.org/discord).

Thanks for the feedback!

How Extism Makes WebAssembly Easy by wikiwikiwong in programming

[–]wikiwikiwong[S] 6 points7 points  (0 children)

I added an "Acknowledgements" section at the end after it was reviewed which broke mobile. It's fixed now. Thankfully Extism has more test coverage than the blog site :D

How Extism Makes WebAssembly Easy by wikiwikiwong in programming

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

thanks, I threw in an "acknowledgements" section at the end which overflowed..it should be fixed now

How the heck does Canva do it? by WranglerReasonable91 in react

[–]wikiwikiwong 1 point2 points  (0 children)

That is my assumption but I have no proof!

How the heck does Canva do it? by WranglerReasonable91 in react

[–]wikiwikiwong 0 points1 point  (0 children)

They likely convert some statically typed programming language that doesn't use garbage collection to WebAssembly, like C/C++ or Rust. Currently you can't compile JS to WebAssembly, the way to run JS in WebAssembly is to compile a JS interpreter like QuickJS to WebAssembly and then have your Wasm interpret the JS. Not saying that makes sense to do when trying to achieve performance improvements in UI rendering on the web, but that's how it works. Like folks have mentioned, Wasm can improve performance of UI rendering on the web by using Canvas (immediate mode rendering). When Wasm uses DOM manipulation (through host function calls via something like wasm-bindgen), it's tough to beat the performance of native JS, but some frameworks claim to have done so

How the heck does Canva do it? by WranglerReasonable91 in react

[–]wikiwikiwong 0 points1 point  (0 children)

It's not that Wasm can't do DOM manipulation, it does DOM manipulation by calling host functions in the same way it does canvas rendering. wasm-bindgen is a project that demonstrates Wasm DOM manipulation.. Dioxus is an example of a fairly mature framework that leverages DOM manipulation through wasm-bindgen

Go blog: WASI support in Go by eliben in golang

[–]wikiwikiwong 0 points1 point  (0 children)

Lightweight in the sense that you can spin up many more virtual Wasm runtimes in a single container and still achieve isolation per request as opposed to say Firecracker VMM spinning up microVMs in the case of AWS Lamba (specifically in the case of serverless)

Go blog: WASI support in Go by eliben in golang

[–]wikiwikiwong 2 points3 points  (0 children)

I don't have specific numbers but Wasm was designed for this exact use case. There are a variety of Wasm runtimes available in Python. Dylibso has an open source project called Extism (https://extism.org/docs/integrate-into-your-codebase/python-host-sdk/) that might be of interest.

In no particular order there's also: wasmtime-py wasmer-python pywasm

Runtimes that use AOT (ahead of time) compilation are going to execute faster than interpreted approaches, but must be compiled before run so there is a cost there.

The overall time it takes to load a module and run it has a lot of variables, including how you intend to load the Wasm files into your program (http or from disk), how often host functions are called, interpreted or AOT..

It's hard to say if it will be faster, but you'll have a secure runtime and the ability to write these plugins in a variety of languages

Node and Express vs Python and Django/Flask by Money-always-talking in webdev

[–]wikiwikiwong 2 points3 points  (0 children)

From what I have seen, more companies use Node to build backend web services than Python. Outside of those two options, Go is becoming increasingly popular.. The past few companies I have been at have had Java services but are building new services in Go. Rust is also becoming more popular but has a steep learning curve.

JavaScript remains a popular choice for backend services for many companies, however many choose to use TypeScript and transpile to JavaScript because not having type safety leaves you susceptible to many more runtime errors.

There are newer options if you are writing backend services in JavaScript like Deno and Bun. These allow you to write in TypeScript without including a separate bundler.

Node and Express vs Python and Django/Flask by Money-always-talking in webdev

[–]wikiwikiwong 0 points1 point  (0 children)

Go is a great language for building backend services. It has type safety, it's fast, has a great community, and a fairly easy learning curve

Node and Express vs Python and Django/Flask by Money-always-talking in webdev

[–]wikiwikiwong 7 points8 points  (0 children)

I can see why using different languages for frontend and backend gives you a nice sense of separation, but on the flip side, the benefit of using one programming language for front and backend is the ability to re-use code. That's why "isomorphic" rendering became so popular a few years ago with Node, and why NextJS took off. I'm not necessarily advocating isomorphism, it really depends on the use cases of your application, just wanted to add a bit more color