Journal 2023-02-28

Scripting in rust

Scripting in rust can be consider better than bash, you can package a lot of functionalities in a single statically linked binary that is easy to distribute and use.

Rust has a lot of libraries that can be used to build a CLI application:

There are also a lot of possibilities throw the ffi:

Finally you can use the std::process module to spawn processes and interact with processes, or I find it more convenient to use the xshell crate. It provides a lot of functions to interact with the shell environment and piping commands. Making the scripting experience very easy,without you having to manually check the status code of each Command.

<!-- Morning --> <!-- What do I want to do today? --> <!-- Evening --> <!-- What did I learn today? --> <!-- Things I learned --> <!-- Useful tools and libraries -->