-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Rust implementation #131
Rust implementation #131
Conversation
Mental note: Linting fails because nested node modules are not ignored by ESLint |
@@ -1,7 +1,9 @@ | |||
#!/usr/bin/env node | |||
|
|||
const chalk = require("chalk"); | |||
const { isSupportedNodeVersion } = require("../utils/versionUtils"); | |||
|
|||
// TODO: How to link lerna with unpublished package? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreyluiz any idea how to fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add the dependency for the clio-utils@0.1.0
package on the clio project package.json
. Npm will automagically use lerna to know where to get the package.
@@ -0,0 +1,17 @@ | |||
[package] | |||
name = "utils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "utils" | |
name = "clio-utils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't work either🧐
Evaluation concluded that Rust isn't really suited for node modules. We would either have to ship compiled binaries for every platform, host these binaries somewhere and download them on install time or compile it during installation of clio. None of these are valid options for us. We will however consider writing native modules in C/C++ in the future, given that virtually anyone has a corresponding compiler on their system. |
@garritfra we can still do rust, and compile to universal wasm binaries, and ship the wasm files instead |
@pouya-eghbali that's probably faster than js, but it doesn't give us native performance |
This might come out of the blue: I've tried rewriting a tiny function in rust to see what its like, and if it works. And sure enough, it works like a charm! I was able to implement the function
isSupportedNodeVersion
in rust. I chose this function, because it does not have a vital impact, yet its easy to implement. Please let me know what you think of this.TODO