Convert Vec<u8> in Rust to Uint8Array in Javascript #6286
Replies: 2 comments 3 replies
-
I want to make a plugin to decode rtsp and render it to webview.
There are chunk datas from |
Beta Was this translation helpful? Give feedback.
-
Nope. and it gets worse than that, the binary data will be converted to a json string first because that's what the current IPC requires. (btw shouldn't converting number[] to Uint8Array be relatively cheap?). You may have more luck with custom protocols - examples: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Api in Tauri covert
Vec<u8>
tonumber[]
in javascript , and covernumber[]
toUint8Array
. There are two traverses in this step.This is's efficient way to transfer a large size of binary data from Rust to Javascript.Is there any way to cover
Vec<u8>
toUint8Array
without memory copy?Beta Was this translation helpful? Give feedback.
All reactions