Vix.cpp v2.3.0

Vix.cpp v2.3.0 is a major vix run workflow release.

This release introduces ultra-fast direct C++ execution for single-file programs, smart CMake fallback for scripts that require more complex build support, local script cache support, SQLite and MySQL flags in run/build workflows, better executable detection, and a cleaner execution pipeline.

The focus of this release is speed without losing correctness. Simple C++ files should run quickly. More complex files should still fall back to the full CMake path when needed.

Ultra-fast direct C++ execution

Vix.cpp v2.3.0 introduces a new direct execution mode for single C++ files. This mode compiles and runs simple C++ files without going through a full CMake configuration step. That matters because single-file C++ development should feel lightweight. When a developer wants to test a small program, example, algorithm, experiment, or utility, the runtime should not force the full project build path unless it is actually needed. The goal is not to replace CMake. The goal is to avoid using CMake when the input is simple enough to compile directly.

Smart CMake fallback

Direct execution is useful only if it remains safe. Vix.cpp v2.3.0 adds smart CMake fallback so vix run can automatically switch back to the CMake path when the script requires complex dependencies, project structure, or runtime support that direct compilation cannot safely handle. This gives Vix two execution paths:

  • direct execution for simple single-file programs
  • CMake fallback for complex Vix scripts and project-aware builds

This design keeps the fast path fast while preserving the correctness of the native C++ build system.

Script cache improvements

This release improves caching for script builds. Script builds are now cached globally and keyed by absolute file path for better reuse across repeated executions. Vix.cpp v2.3.0 also adds:

--local-cache

for script mode in vix run and vix check.

Local cache support gives developers more control over where script build artifacts are stored and helps align repeated script execution with the broader Vix cache behavior. The result is faster repeated runs with fewer unnecessary rebuilds.

Database flags in run and build workflows

Vix.cpp v2.3.0 adds SQLite and MySQL flags directly to vix run and vix build. This improves the developer experience for small database-backed programs and examples. Instead of manually wiring database dependencies for quick experiments, developers can use Vix flags to express that the program needs SQLite or MySQL support. This is especially useful for examples, prototypes, and single-file programs that need to quickly test database logic.

Better executable detection

This release improves executable detection in vix run. Instead of assuming the executable name from the project directory, Vix now resolves executables from actual build directories such as bin/ and scanned targets. This makes project execution more reliable. A C++ project does not always produce a binary with the same name as the folder. The runtime should inspect the build output instead of guessing.

Reorganized run pipeline

Vix.cpp v2.3.0 reorganizes the internal execution pipeline. The run flow is now cleaner and more robust, with improved process handling and better separation between script execution, project execution, and fallback behavior. This is an important foundation for future runtime work. Once vix run supports direct scripts, CMake fallback, built project binaries, runtime flags, database options, and process handling, the pipeline must be structured clearly. Otherwise every new execution mode becomes harder to maintain.

Configuration improvements

This release also improves the configuration system inside the core module. Configuration structure and handling were cleaned up so runtime and example usage can become more predictable. This supports the broader Vix direction: configuration should be explicit, easy to reason about, and usable from real applications.

Fixes

Vix.cpp v2.3.0 fixes several issues around script detection and build diagnostics. Vix runtime scripts are now detected correctly in fallback mode, preventing incorrect fallback behavior when running Vix-based scripts. CMake error detection was improved to avoid misleading build errors and improve project root handling. The vix_utilsConfig.cmake template was also cleaned up to remove redundant content.

Examples

The examples were updated to better demonstrate the improved run workflow. This includes examples for blocking execution, background execution, and dynamic port usage. These examples help show how the new execution pipeline behaves in practical scenarios.

Highlights

  • Added ultra-fast direct C++ execution for single-file programs.
  • Added smart CMake fallback for complex scripts and project-aware builds.
  • Added --local-cache support for script mode in vix run and vix check.
  • Added SQLite and MySQL flags in vix run and vix build.
  • Improved global cache behavior for script builds.
  • Improved executable detection from real build directories and scanned targets.
  • Reorganized the vix run execution pipeline.
  • Improved process handling in the run flow.
  • Improved core configuration structure and handling.
  • Fixed Vix runtime script detection in fallback mode.
  • Improved CMake error detection and project root handling.
  • Cleaned vix_utilsConfig.cmake.
  • Updated run examples for blocking, background, and dynamic port usage.

Compatibility

Vix.cpp v2.3.0 introduces no breaking changes. CMake remains the correct path for complex projects. Direct execution is used for simple single-file programs, while smart fallback keeps project-aware and dependency-heavy cases on the CMake path. Existing project workflows should continue to work normally.

Notes

Vix.cpp v2.3.0 is an important step for the vix run experience. It makes simple C++ execution faster, while still respecting the complexity of real C++ projects. The direction is clear: Vix should make the common path fast, but keep the full native build system available whenever correctness requires it.