Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discuss C/C++ Implementation #135

Open
garritfra opened this issue Jan 19, 2020 · 9 comments
Open

Discuss C/C++ Implementation #135

garritfra opened this issue Jan 19, 2020 · 9 comments
Labels
Area: Compiler Discussion Discussions going on Idea This is an idea or a suggestion

Comments

@garritfra
Copy link
Member

garritfra commented Jan 19, 2020

We should discuss a way to use native code for bottleneck functions.

Related

@garritfra garritfra added Area: Compiler Discussion Discussions going on Idea This is an idea or a suggestion labels Jan 19, 2020
@kination
Copy link
Contributor

kination commented Feb 4, 2020

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.

@garritfra
Copy link
Member Author

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.

@kination
Copy link
Contributor

kination commented Feb 4, 2020

@garritfra seems right~thanks for comment 🙏

@garritfra
Copy link
Member Author

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!

@kination
Copy link
Contributor

kination commented Feb 5, 2020

@garritfra great!
Is rio to replace pacakges/core/part of this repository?

@garritfra
Copy link
Member Author

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.

@pouya-eghbali
Copy link
Member

Afaik, LLVM can compile to JavaScript / WASM, and native binaries / machine code. Should we probably discuss targeting LLVM and moving away from node.js?

@kination
Copy link
Contributor

kination commented Feb 6, 2020

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...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Compiler Discussion Discussions going on Idea This is an idea or a suggestion
Projects
None yet
Development

No branches or pull requests

3 participants