Proposal: Convert MakeFiles and bash scripts into rust via "cargo xtask" convention.
Problem with make and bash
Ion shell grows more and more in complexity and so does the local automation system. Make and bash becomes harder and harder to extend on for automation. While make and bash might have been sufficient for a starting point to automate, this project has reached the point where those tools are not justifiable anymore in my opinion . I propose that we change gears and use rust for local automation too by applying the xtask convention.
What is xtask
There is a simple convention, called xtask, to follow. This convention is possible via the workspace feature of Rust. The rust code for automation is then just another workspace member. Following this convention, we get a full fledged CLI API for automation which depends only on Rust and Cargo. In this system we could utilize the power of rust and its ecosystem for automation.
Link to this convention.
Arguments for cargo xtask convention over make and bash scripts.
- The Redox-Os ecosystem is also about leveraging the capabilities of Rust, so why not also in the automation system.
- Make is primarily a build system and not a command runner. Cargo already provides an build system for Rust.
- Bash as script language does not scale well with growing complexity in automation. Rust on the other hand is way better in this department.
- Can have one language in the project for the application and for the automation system.
- Not all people come from the Linux realm. Automation via Make and Bash increases the learning curve for those people who want fix/improve automation.
- More flexibility in designing the CLI API compared to Make match rules or Bash "getopts" thing.
- It is advantageous to get rid of make and bash for a latter windows port.
- Reduces build tech stack, taking out make and bash.
Willingness for the proof of concept
For demo purposes I would be willing provide a PR which implements the unit/integration test system of Ion via rust in xtask convention. If the PR/Proposal convinces the community, then I would be happy to replace all Make and Bash scripts via Rust in the Ion repository.