Replies: 1 comment
-
I don't know the specifications of midir or webmidi, but here's what I can say. Rust, of course, is gonna be much faster than JavaScript when looked at in a vacuum. However, it's important to note that there are nuances to this. The communication between Rust and Javascript in Tauri is done through an async function called For example, imagine you have a Rust backend function, Conversely, if this Rust function handles an expensive but rarely called operation, such as an initial setup or a one-off data processing task, then leveraging Rust will almost certainly yield better performance. SummaryThis is too broad of a question to answer accurately. The optimal choice depends heavily on factors like:
The real answer is, it depends. While a difference in efficiency between Rust and JavaScript exists, it's often negligible unless you're developing something that demands every nanosecond of performance (think fintech or high-frequency data analytics). For most applications, I'd suggest focusing on what makes development easier and more efficient for you. If you're looking to learn Rust, then this could be a good opportunity! You'll know what works best for your project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
i am thinking about making an app especially for controlling gear with midi.
The idea is to use a db for storing needed data(there is an official plugin) and webmidi.js(https://webmidijs.org/) for sending sysex to the hardware device(and receive data, adjust rotary encoders, buttons etc.), on the web side i tend to use vanilla js/css.
1.) can i use https://github.com/Boddlnagg/midir in tauri's backend ? Would this bring any performance gain compared to using js(webmidi)?
2.) the gui will have several elements, for which i tend to use classes and attribute names in the DOM. Showing and hiding them(labeling and values etc) should also be done with vanilla js / css. big changes (max ~30 gui elements) occurs while loading a new sound. Maybe in the future more and complex GUI -> i am not sure when there is a need of thinking about SSR, react, etc.
Of course it should be a fast UI
(ideally crossplatform, ideally android and linux)
Any suggestion / help / opinions highly appreciated, i have never done amy rust code.
thanks!
Beta Was this translation helpful? Give feedback.
All reactions