lmcode-go-sample

lmcode-go-sample is the static, CGO-free Go 1.26+ reference Shop and Ledger host embedding lmcode-go and passing the canonical sample suite. It embeds the exact schema bytes, binds 45 host signatures alongside lmcode_std_v3, dispatches R49 rule entries, and frames LMCODE_RETURN results.

Quick reference

git clone https://github.com/lmctl-ai/lmcode-go-sample.git
cd lmcode-go-sample
python3 scripts/sync-suite.py --check
CGO_ENABLED=0 go build -trimpath -o build/lmcode-go-sample .
./test.sh
AspectValueRole
Language & toolchainGo 1.26+ (CGO_ENABLED=0)Reference host implementation embedding lmcode-go (github.com/lmctl-ai/lmcode-go)
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-go-sample --version
./build/lmcode-go-sample --lmcode-schema --json
./build/lmcode-go-sample --lmcode-signatures
./build/lmcode-go-sample --lmcode sample-suite/bytecode/001-literals.dslb

Documentation pages

Source repository and releases