Open garritfra opened 4 years ago
Seems Rust is being used for compiling...than isn't it okay to use Rust for native binding? https://github.com/neon-bindings/neon
This is just a question...I'm new in here.
Hi @djKooks! I have tried using Rust with Neon in a small codelab a few days ago (#131), and it worked like a charm. The thing thats holding us back is that if we use rust in our project, the user will need to have the rustc installed on their system, which can be confusing for some people. Another solution would be to build and publish the binaries for every platform via CI, and then downloading it conditionally after installing clio. I think you can see the issues with that :) As much as we'd love to use rust in this project, its not yet suitable for npm packages that will be used on multiple platforms.
Virtually any system has a C/C++ compiler preinstalled, so we can more or less safely assume that we can compile native C++ modules on install-time. Thats why we chose this path for the future.
@garritfra seems right~thanks for comment 🙏
I started working on an experimental Rust implementation for clio: https://github.com/clio-lang/rio
I'm still trying to evaluate some crates for parser implementations. Feel free to share your thoughts!
@garritfra great!
Is rio
to replace pacakges/core/
part of this repository?
I don't think so. At least not anytime soon. If we decide to use rust, we'd probably have to move away from npm, and instead go for a release approach (Something like rustup would be great). But for now, we will stick to npm for the sake of simplicity. We're still in an early state of development.
Afaik, LLVM can compile to JavaScript / WASM, and native binaries / machine code. Should we probably discuss targeting LLVM and moving away from node.js?
Seems this project are focused on 'take advantage of multiple CPUs and CPU cores (parallelism)', maybe you need to think about moving on...(not sure what will be the best option...)
We should discuss a way to use native code for bottleneck functions.
Related