shama / navelgazer

:tangerine::crystal_ball: A super fast, light weight, simple file watcher and platform layer for gaze.
MIT License
21 stars 1 forks source link

Consider Replacing C++ with Rust #13

Open shama opened 9 years ago

shama commented 9 years ago

I'm terrible at C++ and not getting much better. I'm still a newbie with Rust but it seems much easier for me and potentially others.

Downsides is Rust doesn't have file watching natively but here is a candidate: https://crates.io/crates/notify

Also I have no idea the performance difference having to use FFI with Rust.

joshperry commented 8 years ago

I can't say that I have ever used Rust so I wouldn't be a very good resource for help if you went that way. I'm also not sure how the build process and FFI interface for a Rust-based native module would work or how the performance would be.

If there are real benefits to the project in using Rust I'm definitely not going to shoot it down.

Did you write the existing C++ in the project? I found it quite well written and organized.

shama commented 8 years ago

I forked the C++ from https://github.com/atom/node-pathwatcher after pathwatcher started to be more focused on being a file watcher specifically for the Atom editor.

I've changed things here and there but haven't made any real significant improvements to it. Eventually I'd like to normalize more of native APIs at the native addon level which I'll likely not be able to do if it's in C++.

The company I work for is paying me to learn Rust and I've heard some great things about it, so I thought I'd give it a go here. May not pan out to be a good idea but thought I'd mention the idea in case anyone has -1 or +1 towards the idea.