Native application foundation for Vix.cpp.
The Core module provides the main runtime layer used to build HTTP applications in C++ with routes, handlers, middleware, requests, responses, configuration, TLS, static files, templates, and server lifecycle management.
Full documentation is available here:
https://docs.vixcpp.com/modules/core/
API reference:
https://docs.vixcpp.com/modules/core/api-reference
vix::App- HTTP server
- Routing system
- Request and response objects
- Middleware
- Route groups
- Static files
- Templates
- Configuration
- TLS support
- Runtime executor integration
- Async I/O integration
#include <vix.hpp>You can also include Core directly:
#include <vix/core.hpp>#include <vix.hpp>
int main()
{
vix::App app;
app.get("/", [](vix::Request &req, vix::Response &res)
{
(void)req;
res.text("Hello from Vix");
});
app.run(8080);
return 0;
}Run:
vix run main.cppOpen:
http://localhost:8080
#include <vix.hpp>
int main()
{
vix::App app;
app.get("/api/status", [](vix::Request &req, vix::Response &res)
{
(void)req;
res.json({
{"status", "ok"},
{"server", "Vix.cpp"}
});
});
app.run(8080);
return 0;
}App
-> Router
-> HTTPServer
-> Session
-> Transport
-> RuntimeExecutor
Core connects the application API with the runtime, async I/O, HTTP server, routing layer, and response system.
Contributors should use the Vix CLI to build this module.
Vix wraps the C++ build workflow with project detection, presets, Ninja builds, clean logs, caching, and focused diagnostics. This helps avoid hidden C++ build issues and keeps the contributor workflow consistent.
git clone https://github.com/vixcpp/vix.git
cd vix
vix buildUse this before running the full test suite, install workflows, or release checks:
vix build --build-target allUse this when the local CMake cache or build directory may be stale:
vix build --cleanvix build --preset releaseBuild all targets first, then run tests:
vix build --build-target all
vix testsBefore opening a pull request, use:
vix fmt --check
vix build --build-target all
vix tests- Core documentation: https://docs.vixcpp.com/modules/core/
- Core API reference: https://docs.vixcpp.com/modules/core/api-reference
- Build command: https://docs.vixcpp.com/cli/build
- Tests command: https://docs.vixcpp.com/cli/tests
- Documentation: https://docs.vixcpp.com/
- Engineering notes: https://blog.vixcpp.com/
- Registry: https://registry.vixcpp.com/
- GitHub: https://github.com/vixcpp/vix
MIT License.
See LICENSE for details.