Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] IPC support raw binary data. #7127

Closed
lencil opened this issue Jun 4, 2023 · 1 comment
Closed

[feat] IPC support raw binary data. #7127

lencil opened this issue Jun 4, 2023 · 1 comment

Comments

@lencil
Copy link

lencil commented Jun 4, 2023

Describe the problem

I found there is only json formmat could be shared between the rust main process and frontend. When sharing large amount of data, the serializing in backend and deserializing in fontend can lead some cost.
In my situation, I use backend rust code to run some render engine running in special thread itself, and send thousands draw calls command to the frontend, and then apply these draw commands by html5 canvas 2d/webgl.
I found that the json serializing become the bottle neck. I tried to change the binary command to base64 wrapped in json and send to frontend, It was really more fast, but the decode of json and base64 still cost some cpu. So I think how to only send binary data? So that the time of every frame cost could limited less than 16.7ms.

Describe the solution you'd like

sharing binary data between fontend and backend without endcoding and decoding.

Alternatives considered

No response

Additional context

No response

@FabianLars
Copy link
Member

The current webview api we use only supports json string payloads. v2 will have a new ipc backend (starting with a custom protocol which is currently also used to serve your distDir)

For ongoing work on this check tauri-apps/wry#767 and tauri-apps/wry#454 and most importantly https://github.com/tauri-apps/tauri-bindgen/

Also, i'm going to close this as a duplicate of #4197 - thanks for the feedback :)

@FabianLars FabianLars closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants