3 ms·
(4) You want to develop new components in rust, but it has to integrate with your existing components somehow.
by Skunkleton 7y ago
(4) You want to develop new components in rust, but it has to integrate with your existing components somehow.
- zbentley 7y agoWhy not use ffi for this case? Many languages have robust support for linking to Rust code.
- gameswithgo 7y agoyeah sometimes that makes sense. if the lib in question in small enough it might be more valuable to port, so avoid having a multi language project, and avoid the effort of the ffi. at least Rust -> C ffi is zero cost (usually)
- viraptor 7y agoHaving everything available in Rust code also means you don't have to do lots of extra work for cross-compilation.
- saagarjha 7y agoHow does Rust help you if you have to cross-compile?
- saghm 7y agoI'm not positive, but I think GP intended to refer to idea that you would need to multiple compilers to compile the project rather than cross-compiling to another platform.
- viraptor 7y agoYou can compile rust in one go. If you rely on native libraries, you need to be able to link them during cargo build and that's painful to set up. Not impossible... just really annoying to manage.
- pyython 7y agoHow about (5) you're trying to learn Rust and you need a project to work on? Irresponsible for production code, but perfectly valid for a weekend project. And in my experience can be a great way to learn the quirks of a particular language!
- deleted 7y ago[deleted]