is-is-odd icon indicating copy to clipboard operation
is-is-odd copied to clipboard

Rewrite in Rust

Open Lukasdoe opened this issue 2 years ago • 4 comments

We seem to have reached a working version of this project that a lot of customers can enjoy on a daily basis without any major problems or performance issues, that's why I propose to rewrite this project in Rust.

Please let me support my proposal with the following arguments:

  • According to this Medium article, JavaScript is a dead language and we should switch to a modern language to ensure the security and further usability of our project.
  • While single core performance is barely increasing, modern systems get more and more CPU cores. Rust enables us to parallelize the key features of our library by preventing race conditions and supporting async programming.
  • Rust is an unmanaged language, meaning that it has no garbage collector that can at any time interrupt your program. This would allow our project to be used by performance critical and realtime applications.
  • Google also sometimes uses Rust.

Let me know your opinions :)

Lukasdoe avatar Feb 22 '23 20:02 Lukasdoe

I think this is a good idea. We might create a new repo to do this. Rust have many benefits.

Kotlin is also a good langage: it can be compiled for JS, JVM and native.

Alexiscomete avatar Feb 23 '23 12:02 Alexiscomete

Creating a new repo just splits our userbase, doubles the attack surface for potential bugs and increases our (already high) development cost. I don't think we can currently afford managing another high maintenance project.

We could however (as an intermediary solution) incorporate the already ported Rust parts of the implementation into this repository by compiling the Rust code to WebAssembly and supplying a compatibility wrapper to call our Rust implementation from the original JavaScript base.

This allows us to break out small parts of the implementation and replace them one-by-one instead of creating two competing implementations of the same project.

Lukasdoe avatar Feb 23 '23 13:02 Lukasdoe

I also like the idea of using Kotlin, though. We should look into ways to use the JVM and its high portability to reach users that, so far, were not able to profit from our implementation, because our releases did not support their platform or architecture.

Lukasdoe avatar Feb 23 '23 13:02 Lukasdoe

I think we must before resolve the #4 Security vulnerability

Alexiscomete avatar Feb 23 '23 13:02 Alexiscomete