c++ dimensioned arithmetic. zero runtime cost when units known at compile time
  • C++ 89%
  • Nix 7.2%
  • CMake 2.8%
  • Shell 1%
Find a file
2025-08-06 09:30:37 -05:00
.github/workflows
_static/img xo-umbrella: + docs support files 2025-06-22 16:19:21 -05:00
cmake + LinearAlloc + utest 2025-07-29 07:17:35 -05:00
docs xo-object: generative GC utest + reinstate coverage build 2025-08-06 09:30:37 -05:00
pkgs xo-cmake: comments on modules vs configs 2025-07-05 16:16:47 -05:00
xo-alloc xo-object: generative GC utest + reinstate coverage build 2025-08-06 09:30:37 -05:00
xo-callback
xo-cmake + xo-alloc + xo-object + xo-alloc docs + GC utests 2025-08-03 15:59:38 -05:00
xo-distribution
xo-expression xo-alloc: mutation log tracking in working state + unit test 2025-08-05 11:08:36 -05:00
xo-flatstring pretty printing -- copmlete for xo::ast::GeneralizedExpression 2025-07-19 11:47:03 -05:00
xo-indentlog redef ppdetail_atomic 2025-08-03 13:56:49 -05:00
xo-jit xo-expression: generalize envframestack + handle explicit lm retturn 2025-07-28 13:16:09 -04:00
xo-kalmanfilter Add 'xo-kalmanfilter/' from commit '2ced8429c0' 2025-05-11 16:22:42 -05:00
xo-object xo-object: generative GC utest + reinstate coverage build 2025-08-06 09:30:37 -05:00
xo-ordinaltree xo-object: generative GC utest + reinstate coverage build 2025-08-06 09:30:37 -05:00
xo-printjson
xo-process xo-process: prefer xo::bp spelling to xo::ref::brw 2025-07-05 13:53:46 -05:00
xo-pydistribution Add 'xo-pydistribution/' from commit 'a142a0044c' 2025-05-11 15:57:32 -05:00
xo-pyexpression refactor xo::ast -> xo::scm + restore nodef ppdetail_atomic build 2025-07-28 10:13:25 -04:00
xo-pyjit refactor xo::ast -> xo::scm + restore nodef ppdetail_atomic build 2025-07-28 10:13:25 -04:00
xo-pykalmanfilter Add 'xo-pykalmanfilter/' from commit 'a9daaa3278' 2025-05-11 16:27:01 -05:00
xo-pyprintjson
xo-pyprocess Add 'xo-pyprocess/' from commit 'c4af12c625' 2025-05-11 16:19:35 -05:00
xo-pyreactor
xo-pyreflect
xo-pyrprintjson
xo-pysimulator Add 'xo-pysimulator/' from commit 'f940051411' 2025-05-11 16:06:48 -05:00
xo-pyunit
xo-pyutil
xo-pywebsock
xo-pywebutil
xo-randomgen
xo-ratio build: bugfix: missing headeronly deps break submodule build 2025-07-06 14:31:52 -05:00
xo-reactor pretty printing -- copmlete for xo::ast::GeneralizedExpression 2025-07-19 11:47:03 -05:00
xo-reader minor logging adds 2025-07-28 15:16:11 -04:00
xo-refcnt pretty printing -- copmlete for xo::ast::GeneralizedExpression 2025-07-19 11:47:03 -05:00
xo-reflect xo-reflect: bugfix is_i64 on linux (gcc / wsl2) 2025-07-27 14:31:39 -04:00
xo-reflectutil
xo-simulator pretty printing -- copmlete for xo::ast::GeneralizedExpression 2025-07-19 11:47:03 -05:00
xo-statistics
xo-subsys
xo-tokenizer xo-expression: less-than-or-equal 2025-07-27 18:19:54 -04:00
xo-unit pretty printing -- copmlete for xo::ast::GeneralizedExpression 2025-07-19 11:47:03 -05:00
xo-websock use xo::bp instead of xo::ref::brw 2025-07-05 13:55:00 -05:00
xo-webutil
.gitignore
CMakeLists.txt + xo-alloc + xo-object + xo-alloc docs + GC utests 2025-08-03 15:59:38 -05:00
conf.py xo-tokenizer: docs + error-handling improvement 2025-06-23 23:08:12 -05:00
default.nix nix: try gsettings-desktop-schemas 2025-08-05 11:09:35 -05:00
Doxyfile.in xo-umbrella: + docs support files 2025-06-22 16:19:21 -05:00
index.rst + xo-alloc + xo-object + xo-alloc docs + GC utests 2025-08-03 15:59:38 -05:00
README.md xo-object: generative GC utest + reinstate coverage build 2025-08-06 09:30:37 -05:00

Introduction

Local nix build for xo libraries. Intended for local development work, with source in immediate subdirectories.

Features

  • native c++
  • deterministic simulation
  • reflection
  • python bindings

Getting Started

Cmake build

If nix is available, you probably prefer the nix build. Otherwise continue reading..

The cmake build has two phases, because it needs to bootstrap generated xo-cmake-config, xo-build helpers.

$ cd xo
$ PREFIX=/path/to/say/usr/local
# phase 1
$ cmake -B .build0 -S xo-cmake -DCMAKE_INSTALL_PREFIX=${PREFIX}
$ cmake --build .build0
$ cmake --install .build0
# phase 2
$ cmake -B .build -S . -DCMAKE_INSTALL_PREFIX=${PREFIX} -DXO_ENABLE_EXAMPLES=1
$ cmake --build .build
$ cmake --install .build

Nix Build

Nix build uses toplevel default.nix, along with top-level pkgs/xo-foo.nix for each subproject foo. It doesn't interact with toplevel CMakeLists.txt.

$ nix-build -A xo-userenv

This builds all xo subprojects, assembles sandbox under ./result.

$ tree -L 1 ./result
./result
├── bin
│   ├── xo-build
│   ├── xo-cmake-config
│   └── xo-cmake-lcov-harness
└── share
    ├── cmake
    │   └── xo_macros
    │       ├── code-coverage.cmake
    │       ├── xo-project-macros.cmake
    │       └── xo_cxx.cmake
    ├── etc
    │   └── xo
    │       └── subsystem-list
    └── xo-macros
        ├── Doxyfile.in
        ├── gen-ccov.in
        └── xo-bootstrap-macros.cmake

For completeness' sake: can also use

$ nix-build -A xo-userenv-slow

Same result as $nix-build -A xo-userenv, but builds each package serially using xo-build.

Coverage Build

Prepare build

# phase 2
$ cmake -B .build -S . -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_BUILD_TYPE=Debug -DCODE_COVERAGE=ON

Build coverage-enabled libraries and executables

$ (cd .build && make ccov)

To view docs from WSL

  1. find wsl IP address
$ hostname -I
  1. run nix build
$ nix-build -A xo-userenv
  1. serve docs from some available port
$ (cd result && python3 -m http.server 3000)
  1. browse to ":3000/share/doc/xo-flatstring/html" from windows

To add a new satellite repo

  1. check clone in clean state (all local changes committed or unwound)

  2. add satellite as remote

$ git remote add xo-foo git@github.com:Rconybea/xo-foo.git
$ git fetch xo-foo
  1. checkout satellite repo
$ git subtree add --prefix=xo-foo xo-foo main