Earlier quoted context omitted.
How could/would you do "DOM event -> native FFI dlsym-type call"?
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.
Breaking the WASM/JS communication performance barrier
31–34 of 34 posts
Re: Breaking the WASM/JS communication performance barrier
#32Earlier quoted context omitted.
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.
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?
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
#33Earlier quoted context omitted.
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?
> 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
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
#34Earlier quoted context omitted.
> 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
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.
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.