lmcode-c-sample

lmcode-c-sample is the reference C11 domain library and C++17 host application demonstrating how to wrap a pure C library with lmcode-cpp. It exposes the 45-signature Shop/Ledger/Money domain alongside the lmcode_std_v3 standard catalog and passes the canonical DSLB v6 sample suite.

Quick reference

git clone https://github.com/lmctl-ai/lmcode-c-sample.git
cd lmcode-c-sample
make test-domain
./test.sh
AspectValueRole
Language & toolchainC11 + C++17Reference host implementation embedding lmcode-cpp (dslvm.hpp)
Domain schema45 host signaturesShop, Items, Money, Ledger, Currency enum, operators, and Adjuster/Score interfaces
Standard cataloglmcode_std_v3Preloaded standard catalog plus opt-in print and assert_close testing helpers
--lmcode-schema [--json]Discovery flagPrint human summary or exact embedded dsl.schema: 2 JSON bytes (exit 0)
--lmcode-signaturesDiscovery flagPrint sorted canonical host and standard signatures (exit 0)
--lmcode / --first / --lastExecution flagsRun one or more compiled DSLB v6 chunks, dispatch @item/@total entries, and frame results
./build/lmcode-c-sample --version
./build/lmcode-c-sample --lmcode-schema --json
./build/lmcode-c-sample --lmcode-signatures
./build/lmcode-c-sample --lmcode sample-suite/bytecode/001-literals.dslb

Documentation pages

Source repository and releases