You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here’s another idea :) It’s a bit out there, as it’s not WASM-related at all. But imagine the following scenario:
You’re using fp-bindgen to bundle Rust code with your web frontend. So far so good. But now you want to create a “native” desktop application and you settle on Tauri for this. Of course, Tauri supports WASM so as soon as you have everything up and running you could call it a day.
But why stop there? You’re shipping a native application to your users, so why not compile your Rust code as part of the core application instead of WASM? Tauri allows you to implement custom commands in Rust, so it should be possible. At the least, it’s likely to boost your startup performance and there’s a decent chance your runtime performance will benefit too*. It could give your users another reason to install your app!
So how do you hook this up? You could do it by hand, and honestly it seems easier to do than for writing WASM bindings. But it would be quite a hassle still. What if fp-bindgen could generate these bindings too?
It could be as simple as two new targets: One for the Tauri runtime and one for the Tauri frontend. Type definitions could be reused from our existing TS and Rust generators.
We might look into Tauri for Fiberplane in the future, but I don’t think we’ll pick this up soon. Would be curious to hear if others are interested in this though :)
*) actual runtime performance would also depend on the cost of the Tauri bridge, which I suspect to be slightly slower than the WASM bridge. Either way, that would require some benchmarking…
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Here’s another idea :) It’s a bit out there, as it’s not WASM-related at all. But imagine the following scenario:
You’re using
fp-bindgen
to bundle Rust code with your web frontend. So far so good. But now you want to create a “native” desktop application and you settle on Tauri for this. Of course, Tauri supports WASM so as soon as you have everything up and running you could call it a day.But why stop there? You’re shipping a native application to your users, so why not compile your Rust code as part of the core application instead of WASM? Tauri allows you to implement custom commands in Rust, so it should be possible. At the least, it’s likely to boost your startup performance and there’s a decent chance your runtime performance will benefit too*. It could give your users another reason to install your app!
So how do you hook this up? You could do it by hand, and honestly it seems easier to do than for writing WASM bindings. But it would be quite a hassle still. What if
fp-bindgen
could generate these bindings too?It could be as simple as two new targets: One for the Tauri runtime and one for the Tauri frontend. Type definitions could be reused from our existing TS and Rust generators.
We might look into Tauri for Fiberplane in the future, but I don’t think we’ll pick this up soon. Would be curious to hear if others are interested in this though :)
*) actual runtime performance would also depend on the cost of the Tauri bridge, which I suspect to be slightly slower than the WASM bridge. Either way, that would require some benchmarking…
Beta Was this translation helpful? Give feedback.
All reactions