4 ms·
I've written a few IT Scripts in Rust to do simple things like modify DNS files, set file permissions, back up dir's. The only change between the Windows/Linux
by valarauca1 11y ago
I've written a few IT Scripts in Rust to do simple things like modify DNS files, set file permissions, back up dir's.
The only change between the Windows/Linux was modifying the paths from " / " to " \\ ". I could just git clone, and pass all tests out of the box.
This is also my experience moving a code base from Linux x86_64 to ARMv7.
None of these we're dipping heavily into unsafe code, so ymmv.
- blaenk 11y agoYou shouldn't have to change the path separators; Windows supports '/' as well, if you're working with paths. If there's something else you're doing, you might benefit from something like http://doc.rust-lang.org/std/path/constant.MAIN_SEPARATOR.html http://doc.rust-lang.org/std/path/constant.MAIN_SEPARATOR.ht...
- vvanders 11y agoI'm been pleasantly surprised at how good rust is for build-scripts and the like. I've started using the build.rs capabilities of Cargo recently and between the solid implementation of Process(including pipes) and general robust-ness it's been refreshing.