News for hackers. Stuff that matters.
Re:Breaking the WASM/JS communication performance barrier by MuffinFlavored on Saturday July 26, 2025 @09:54PM (#44698286)
How could/would you do "DOM event -> native FFI dlsym-type call"?
Re:Breaking the WASM/JS communication performance barrier by nicoburns on Sunday July 27, 2025 @07:34AM (#44700535)
You could either use Dioxus-Native which combines Blitz with Dioxus (a React-like framework but in Rust).

Or you could implement the EventHandler trait https://docs.rs/blitz-dom/latest/blitz_dom/trait.EventHandle...

In either case you will recieve the event as a Rust struct passed to a Rust function. So you could call Rust depdencies directly, and C dependencies would just require Rust bindings.

Re:Breaking the WASM/JS communication performance barrier by MuffinFlavored on Sunday July 27, 2025 @07:53AM (#44700656)
I see. It's a new rendering engine, not "Blink/WebKit/etc.". Am I right that WebKit does not support what you and I are discussing equivalent wise? Passing structs or "binary" events?
Re:Breaking the WASM/JS communication performance barrier by nicoburns on Sunday July 27, 2025 @09:01AM (#44701033)
> I see. It's a new rendering engine, not "Blink/WebKit/etc."

Correct

> Am I right that WebKit does not support what you and I are discussing equivalent wise? Passing structs or "binary" events?

I'm not sure. If I wanted to do this I'd probably look into https://ultralig.ht/ which is a commercial fork of webkit. See: https://docs.ultralig.ht/docs/calling-a-c-function-from-js

Re:Breaking the WASM/JS communication performance barrier by MuffinFlavored on Sunday July 27, 2025 @03:22PM (#44703831)
Great link, thanks.

I'm probably being conceited but the fact that some company somewhere thought it was a good idea to add this feature for commercial efforts probably makes me think it's missing from the open source world.

Given your knowledge on Dioxus, do you think Dioxus/Tauri/Wry will eventually support something like this? I guess it's kind of niche.

Re:Breaking the WASM/JS communication performance barrier by nicoburns on Sunday July 27, 2025 @08:42PM (#44706071)
> Given your knowledge on Dioxus, do you think Dioxus/Tauri/Wry will eventually support something like this?

Something webkit based? Almost certainly not from a Dioxus perspective. We may add JavaScript support to Blitz at some point though. I believe Tauri have been looking at a WPE backend which may be able to support these kind of things, but I wouldn't hold your breath.