Vix.cpp v2.4.0

Vix.cpp v2.4.0 is a major ecosystem release. This release expands the modular architecture of Vix.cpp, introduces native static file serving in the core runtime, adds the new vix::tests module, improves environment handling, standardizes umbrella headers, and adds a large set of real-world examples across the ecosystem. The focus of this release is structure. Vix.cpp is becoming more consistent as a modular C++ runtime where core runtime behavior, configuration, testing, filesystem utilities, process tools, logging, and examples follow the same design philosophy.

Native static file serving

Vix.cpp v2.4.0 introduces native static file serving through:

app.static_dir(...);

Static file serving is now part of the core runtime. This means static files no longer require middleware or a separate bootstrap layer. The router can now serve static files through its fallback path before returning a 404 response. The root mount / was also fixed so nested paths such as /index.html, /style.css, and other frontend assets resolve correctly. This change removes the old static handler bridge and the previous middleware dependency for static serving. For real applications, this matters because serving a frontend, documentation UI, dashboard, or static assets should be a core runtime capability, not an external workaround.

Core runtime cleanup

This release removes the deprecated vix/core.h header. The Vix public API continues moving toward consistent modern C++ include paths, especially through umbrella headers such as:

#include <vix/core.hpp>

and the top-level SDK include:

#include <vix.hpp>

Removing legacy headers keeps the public API cleaner and reduces confusion between old and current runtime entry points.

New standalone modules

Vix.cpp v2.4.0 integrates several new modules into the ecosystem:

  • env
  • error
  • fs
  • io
  • log
  • os
  • path
  • process
  • tests

These modules follow the same Vix design direction: minimal dependencies, predictable behavior, production-oriented APIs, and compatibility with both standalone and umbrella builds. This is important for the long-term architecture because Vix should not be a monolithic runtime where every utility lives inside core. Instead, each capability should have a clear module boundary.

Umbrella headers

All major modules now expose a single public entry point. Examples include:

#include <vix/async.hpp>
#include <vix/cache.hpp>
#include <vix/env.hpp>
#include <vix/error.hpp>
#include <vix/fs.hpp>
#include <vix/io.hpp>
#include <vix/json.hpp>
#include <vix/log.hpp>
#include <vix/middleware.hpp>
#include <vix/net.hpp>
#include <vix/orm.hpp>
#include <vix/os.hpp>
#include <vix/path.hpp>
#include <vix/process.hpp>
#include <vix/sync.hpp>
#include <vix/tests.hpp>
#include <vix/websocket.hpp>

This gives Vix a cleaner and more predictable public include model. Developers no longer need to understand deep internal header paths for common usage. Each module has one obvious public entry point. That improves developer experience while keeping internal organization free to evolve.

Native testing module

Vix.cpp v2.4.0 introduces the new vix::tests module. The testing module follows a simple design:

  • explicit test registration
  • no macros
  • no hidden magic
  • exception-based failure handling
  • clean API
  • optional CTest integration

A minimal test looks like this:

auto &registry = TestRegistry::instance();

registry.add(TestCase("basic test", [] {
    Assert::equal(2 + 2, 4);
}));

return TestRunner::run_all_and_exit();

The goal is not to replace every advanced C++ testing framework. The goal is to provide a small native testing layer that fits the Vix ecosystem, works cleanly with examples and modules, and can integrate with CTest when needed.

Environment system

The environment system is significantly expanded in this release. Vix.cpp v2.4.0 adds .env file support, layered configuration, typed access, and production-oriented configuration patterns. The examples now cover configuration for:

  • server settings
  • database settings
  • logging settings
  • WebSocket settings
  • layered environments

This gives Vix projects a clearer configuration story. Instead of hardcoding runtime values or relying on outdated JSON configuration files, applications can now use environment-driven configuration patterns closer to production practice.

Database configuration examples

This release improves database integration examples with environment-driven configuration. New examples cover:

  • MySQL
  • SQLite
  • connection pooling
  • prepared queries
  • transactions

A full HTTP + database environment showcase is also included. This matters because database configuration is one of the first places where real applications need clean separation between code, local settings, and deployment settings.

Vix.cpp v2.4.0 makes that workflow more visible and easier to copy into real projects.

Static file examples

Static file serving now has dedicated examples. The new examples include:

01_basic_static.cpp
02_static_directory.cpp
03_static_with_cache.cpp

These examples demonstrate directory mounting with app.static_dir, automatic index.html resolution, cache control support, and safe path handling. This gives developers a direct path for serving static assets from the Vix core runtime.

Expanded examples

Vix.cpp v2.4.0 adds and updates a large set of examples across modules. The examples now cover configuration, environment loading, error handling, filesystem operations, IO utilities, logging, OS helpers, ORM usage, and HTTP + database integration. This is important because examples are part of the public developer experience. A module is easier to trust when it has examples that show real usage patterns rather than isolated toy calls.

Modular architecture

This release improves the modular structure of the Vix ecosystem. The architecture is now cleaner in several areas:

  • clearer module boundaries
  • standardized CMake packaging
  • better separation between core and extensions
  • native static serving inside the core runtime
  • standalone module usage
  • umbrella-compatible module usage

This makes the codebase easier to scale. Vix can continue adding capabilities without forcing everything into core or exposing unstable internal paths to users.

Highlights

  • Added native App::static_dir.
  • Added static file serving through router fallback before 404.
  • Fixed root mount / for nested static paths.
  • Removed the legacy static handler bridge.
  • Removed the middleware dependency for static file serving.
  • Removed deprecated vix/core.h.
  • Added the env module.
  • Added the error module.
  • Added the fs module.
  • Added the io module.
  • Added the log module.
  • Added the os module.
  • Added the path module.
  • Added the process module.
  • Added the tests module.
  • Added public umbrella headers across the ecosystem.
  • Added the native vix::tests module.
  • Added .env file support.
  • Added layered configuration support.
  • Added typed environment access.
  • Added database configuration examples for MySQL and SQLite.
  • Added connection pooling, prepared query, and transaction examples.
  • Added static file examples.
  • Added expanded examples across config, env, error, fs, io, log, os, and ORM.
  • Standardized .env.example usage.
  • Improved documentation across core and db.

Compatibility

Vix.cpp v2.4.0 continues the V2 modularization effort. Static files no longer require middleware or bootstrap code. Projects using legacy static middleware patterns should migrate to:

app.static_dir(...);

Projects should also review .env usage and update configuration patterns to the expanded environment system where appropriate. The deprecated vix/core.h header has been removed. Projects should use the modern .hpp headers instead. For testing, projects can adopt vix::tests when they want a small native testing layer aligned with the Vix ecosystem.

Notes

Vix.cpp v2.4.0 is a structural release. Static serving is now native to the runtime. Configuration is centered around .env. Modules expose consistent umbrella headers. Testing has a native module. Examples are broader and closer to real application usage. This release moves Vix.cpp further away from being only a runtime library and closer to being a complete modular C++ application ecosystem.