#Using IPC Channel to push binary data from BE to FE - Possible?

3 messages · Page 1 of 1 (latest)

slate wraith
#

Basically what the title says. I'm a bit confused, as I seem to be seeing conflicting messages, but all my testing seems to show that sending a Vec<u8> through a channel to the front end still serializes through JSON.

Guess I'll just go straight to the source: @random bolt - in this thread here (https://github.com/tauri-apps/tauri/issues/13405) you say: "the channel api already support binary data btw". Is there a specific way to get the binary data through to the other side when emitting/pushing from the Rust side? I've been able to use the Response struct to get binary data through when invoking from the front end, but that's not my intended design - looking to update frames from a transport callback on the Rust side.

GitHub

More concise description (the bulk of this conversation was debugging a niche GPU rendering issue) Tauri currently supports sending binary data from the FE to Rust with array buffers. It would be g...

random bolt
#

Is there a specific way to get the binary data through to the other side when emitting/pushing from the Rust side?
Similar to how it works in the commands. channel.send() takes impl InvokeResponse so you can send an InvokeBody::Raw to skip serialization