In tauri, Use the official API interface, will the Rust API run faster than the JavaScript API? #10365
-
For example, which will make the program run faster using the Rust API than using the JavaScript API? Or are they both going at the same speed? |
Beta Was this translation helpful? Give feedback.
Answered by
FabianLars
Jul 23, 2024
Replies: 1 comment 1 reply
-
The JS Apis will run the Rust Apis behind the scenes but because of the communication between both sides, using the js Apis will be slower. -> Using the Rust Apis is generally faster. If you need to return something to the js side from the rust code it's recommended to return only what's actually needed to keep the tax on the IPC low. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
muyaCode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The JS Apis will run the Rust Apis behind the scenes but because of the communication between both sides, using the js Apis will be slower.
-> Using the Rust Apis is generally faster. If you need to return something to the js side from the rust code it's recommended to return only what's actually needed to keep the tax on the IPC low.