Thu 31 July 2025

☀️ Sane C++ July 25

SC

Welcome to the update post for July 2025!
It's dependency cleanup month! 🧹🧹🧹

Automatic Dependency and LOC

List of dependencies between libraries and the number of lines of code (LOC) composing them gives an immediate complexity indication.

For this reason from this month I've started publishing:

An automatic python scripts now updates both inside each library documentation page and also to Readmes and elsewhere.

This has been the input to start attacking and removing un-needed inter-dependencies between libraries.

This has in turn freed many libraries from dynamic allocation!

Detailed list of commits:

Foundation cleanup

The Foundation library received several updates in order to make it as minimal as possible.

All of these building blocks have been necessary to allow removal of several inter-dependencies between libraries in the project.

Dynamic allocation status: No allocation

Detailed list of commits:

Async dependencies

Async is an advanced multi-platform async IO library with a feature set that is progressively expanding.

The biggest library of the project has now no more dependency on Process library. Combining this with all the other dependency cleanups of this month makes the library set of transitive dependencies much cleaner.

Previously the SC::Async Library was depending on almost the entire rest of Sane C++ Libraries!

Now the entire list of dependencies for Async is File, FileSystem, Foundation, Socket, Threading, Time.

Dynamic allocation status: No allocation

Detailed list of commits:

FileSystemWatcher Dependencies

FileSystemWatcher has probably been the hardest dependency cleanup to finish.

In addition to removing dependencies from Strings and Memory libraries, it has been necessary to remove dependency from the Async library too. The reason is that FileSystemWatcher supports both a thread based backend or an event loop based one.

Now the role of integrating FileSystemWatcher with Async has been isolated in the FileSystemWatcherAsync library, through some minimal runtime virtual interface usage.

Dynamic allocation status: No allocation

Detailed list of commits:

FileSystem Dependencies

The FileSystem library underwent significant refactoring to simplify its code and reduce dependencies:

Library now only depends on Foundation and Time libraries.

Dynamic allocation status: No allocation

Detailed list of commits:

FileSystemIterator dependencies

FileSystemIterator has been already cleaned up during path month's effort. This month however the extremely error prone manual string handling has been reduced through the use of the new StringPath class

Library now only depends on Foundation library.

Dynamic allocation status: No allocation

Detailed list of commits:

File dependencies

File has also seen removal of dependencies from Memory and Strings, by using StringPath for simplifying string handling.

Library now only depends on Foundation library.

Dynamic allocation status: No allocation

Detailed list of commits:

Process dependencies

The Process library has seen also dependency from Strings and Memory library removed, through some lightweight runtime abstraction (IGrowableBuffer). This interface abstracts read/write operation to/from Strings and Buffers.

Library now only depends on File and Foundation libraries.

Dynamic allocation status: No allocation

Detailed list of commits:

Socket dependencies

The Socket libraries has been streamlined by removing dependencies on Strings, File, Threading and Time.

Library now only depends on Foundation.

Dynamic allocation status: No allocation

Detailed list of commits:

Strings improvements

The Strings library saw several improvements:

Dynamic allocation status: Allocates dynamic memory

Detailed list of commits:

Other improvements

Detailed list of commits: