Fri 31 May 2024

🌸 Sane C++ May 24

SC

Welcome to the Sane C++ Libraries May 2024 update post!
No big feature has been added this month, so this is a month a bugfixes and incremental improvements.

📄 Sane C++ Libraries Documentation
💻 Sane C++ Libraries Repository
📹 Sane Coding Youtube channel
💬 Sane Coding Discord

SC::Async#

Fine tuning

SC::Async Library has been receiving some fixes and an useful refactoring.

AsyncEventLoop::runOnce has been split into three methods, separating:

  • request submission
  • polling for new events
  • completion callbacks dispatch
This allows submitting request from a "main" thread, that already has an event loop, blocking to poll for changes on a separate thread, and dispatching the callbacks for events received again on the same thread used for submission.
The main use of this would be integrating an AsyncEventLoop with another event loop from another library that already "owns" the application main thread, including a GUI event loop.
This refactoring has been recorded in a video

Relevant commits:

SC::Build#

Handmade toy build system generator grows

SC::Build Library has also been receiving some love, increasing its capability while simplifying SC-build.cpp scripts:

  • Support generating VS2019 projects (needed by the Windows10 Github runner)
  • Support Objective-C or Objective-C++ files
  • Support generating multiple projects
  • Support libraries to link (Makefile backend)
  • Support creating non-console applications (Windows)
  • Consistently handle all paths (include, libraries etc) as relative to project root

Relevant commits:

GitHub CI#

because a good and lean CI keeps you healthy

The GitHub CI has been simplified, consisting now of three github workflow files:

  • windows (windows 10 + windows 11)
  • posix (linux + macOS)
  • documentation and coverage (macOS)

The GitHub CI matrix feature has been used to test multiple platforms and configurations. On all platforms both Debug and Release configurations are now being tested. Additionally also Windows 10 has been added to the list of platform tested by the CI.

Relevant Commits:

SC::Socket#

Sockets keep your feet warm

SC::Socket library has been cleaned up, after some "encouragement" given in a issue that was trying to expand UDP support.

Relevant commits:

First contribution!#

First contributor of the project has appeared!
Thanks to this contributor PR now both Tools and Plugin will work even if visual studio is installed in a directory different from default!

More importantly the entire CONTRIBUTING.md guide has been validated and this also proves that SC::Tools and the GitHub CI have been doing their job just fine!

Additional fixes#

An issue has been reported when mixing Sane C++ Libraries with C++ Standard Library on Linux and they've been fixed as well.