Announcing gfold 3

Today marks the release of gfold 3 πŸŽ‰!

It’s a bit surreal, given that this project started in a private repository from my early days of learning Rust.

I began to learn Rust in the middle of 2019, for many of the reasons popular among newcomers: safe concurrency, compile-time reliability, great community, etc. Leading into 2020, my Rust code steadily improved, I started iterating on public projects (as well as many more private projects), and gfold’s codebase aged quickly.

All of my other Rust projects were better designed, better written, and more interesting in a technical sense than gfold. Yet, I continued to use it more than any of those projects. Despite the state of the codebase, my favorite part about gfold was that I was using it daily, and multiple times throughout the day. Thus, I decided to open source what I had in early April 2020.

Many of you decided to try it out since then! At least, it seems as such because, as of version 3.0.0-rc.4, the project has seen the following:

For a project that was not originally intended to live past my earliest days of learning Rust, that’s pretty great! I’m thankful for all users of gfold, and I am excited for you to try out version 3.0.0.

Design

gfold 3.0.0 is centered around a domain-driven refactor. Its focus areas include the following:

These focus areas contain separate entities that try to be self-contained. However, gfold is a small, β€œsingle-execution” binary, so these focus areas may intersect with one another in practice. For example, it might be optimal to combine and parallelize everything:

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ perform a directory walk β”‚
β”Œβ”€β”€β”€β–Ί with each "dive" opened  β”‚
β”‚   β”‚ as a (green) thread      β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚                 β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   β”‚    determine if the           β”‚
β”‚   β”‚    child path is a target     β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”˜
β”‚            β”‚                   β”‚
β”‚          false               true
β”‚            β”‚                   β”‚
β”‚            β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”
β”‚            β”‚  β”‚ generate a report β”‚
β”‚            β”‚  β”‚ with that path    β”‚
β”‚            β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”˜
β”‚            β”‚                   β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚   β”‚ create another (green) β”‚   β”‚
└──── thread with that path  β”‚   β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
                                 β”‚
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”
               β”‚ display that report   β”‚
               β”‚ immediately to STDOUT β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

That could result in incredibly fast execution, but you would run into a number of other problems:

All of these questions were similar to those that arose during gfold 3.0.0 development.

The final architecture diagram contained more discrete parts; making each focus area a little more extendable. While they might not be co-joined, trading minor performance hits for extensibility was well worth it in the final design. Overall, the goal was to strike a balance between being a fast, glorified script runner and being a slower, complex application.

New Features

Aside from the design philosophy change and overall refactor, there are a number of new features. They include, but are not limited to, the following:

There have been numerous performance improvements, a new CLI parsing structure, and other smaller changes, but the above features encompass the end user goals for this release.

Closing

Thank you for reading and enjoy gfold 3!


A special thank you to those who have helped along the way: