Rix is the unified userland library layer for Vix.cpp.
It gives Vix C++ projects a single optional facade object:
#include <rix.hpp>
int main()
{
rix.debug.print("Hello", "Rix");
auto table = rix.csv.parse("name,language\nAda,C++\n");
rix.debug.log("loaded {} rows", table.size());
}Rix does not replace Vix.
Vix provides the runtime, CLI, build workflow, registry integration, and core foundations.
Rix provides optional userland packages and a unified facade over them.
Rix is built around two levels.
@rix/csv
@rix/debug
@rix/config
@rix/tableThese are independent packages.
@rix/rixThis is the unified facade package.
The facade mounts independent packages into one object-style API:
rix.csv.parse(...)
rix.debug.print(...)
rix.debug.format(...)
rix.debug.log(...)
rix.debug.inspect(...)vix add @rix/rix
vix install#include <rix.hpp>
int main()
{
rix.debug.print("Hello", "Rix");
const auto message = rix.debug.format("Package: {}", "rix/rix");
rix.debug.log("message: {}", message);
return 0;
}| Package | Facade API | Description |
|---|---|---|
@rix/csv |
rix.csv |
Small CSV reader and writer for Vix C++ projects. |
@rix/debug |
rix.debug |
Debug printing, formatting, logging, and inspection utilities. |
#include <rix.hpp>
#include <string>
int main()
{
const std::string input =
"name,language\n"
"Ada,C++\n"
"Gaspard,Vix\n";
const auto table = rix.csv.parse(input);
rix.debug.log("loaded {} rows", table.size());
for (const auto &row : table)
{
for (const auto &field : row)
{
rix.debug.print(field);
}
}
return 0;
}#include <rix.hpp>
int main()
{
rix.debug.print("Hello", "Rix");
auto text = rix.debug.format("Package: {}", "rix/rix");
rix.debug.log("loaded {} APIs", 4);
rix.debug.log.warn("slow path: {}ms", 120);
rix.debug.inspect(text);
return 0;
}rix.debug.print does not replace {} placeholders.
It prints values separated by spaces:
rix.debug.print("Hello", "Rix");
rix.debug.print(1, 2, 3);Output:
Hello Rix
1 2 3For placeholder formatting, use rix.debug.format:
auto text = rix.debug.format("Hello {}", "Rix");
rix.debug.print(text);Or use rix.debug.log directly:
rix.debug.log("Hello {}", "Rix");Each Rix module can also be used independently.
For example:
vix add @rix/csv
vix install#include <rix/csv.hpp>
int main()
{
rixlib::csv::Csv csv;
auto table = csv.parse("name,language\nAda,C++\n");
return 0;
}And:
vix add @rix/debug
vix install#include <rix/debug.hpp>
int main()
{
rixlib::debug::Debug debug;
debug.print("Hello", "Rix");
debug.log("loaded {} rows", 3);
return 0;
}rix/
├── include/
│ └── rix.hpp
├── examples/
│ ├── basic.cpp
│ ├── csv.cpp
│ └── debug.cpp
├── tests/
│ └── rix_tests.cpp
├── packages/
│ ├── csv/
│ │ ├── README.md
│ │ └── vix.json
│ └── debug/
│ ├── README.md
│ └── vix.json
├── CMakeLists.txt
├── vix.json
├── vix.lock
└── README.mdThis repository has two roles.
First, it is the source package for the unified facade:
@rix/rixSecond, it is the official human-readable index of Rix packages:
packages/csv
packages/debugThe real source code of each independent package lives in its own repository:
https://github.com/rixcpp/csv
https://github.com/rixcpp/debugvix install
vix build --build-target all -vBecause this repository contains multiple examples, run one explicitly:
vix run rix_basic
vix run rix_csv_example
vix run rix_debug_examplevix testsVix -> runtime, CLI, build workflow, registry client
Rix -> userland libraries and unified facade
Registry -> package metadata and version resolutionRix keeps packages modular while still offering one clean entry point for users who want the full standard userland layer.
rix.csv.parse(...)
rix.csv.write(...)
rix.debug.print(...)
rix.debug.format(...)
rix.debug.log(...)
rix.debug.inspect(...)MIT