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
| Aspect | Value | Role |
|---|---|---|
| Language & toolchain | Go 1.26+ (CGO_ENABLED=0) | Reference host implementation embedding lmcode-go (github.com/lmctl-ai/lmcode-go) |
| Domain schema | 45 host signatures | Shop, Items, Money, Ledger, Currency enum, operators, and Adjuster/Score interfaces |
| Standard catalog | lmcode_std_v3 | Preloaded standard catalog plus opt-in print and assert_close testing helpers |
| --lmcode-schema [--json] | Discovery flag | Print human summary or exact embedded dsl.schema: 2 JSON bytes (exit 0) |
| --lmcode-signatures | Discovery flag | Print sorted canonical host and standard signatures (exit 0) |
| --lmcode / --first / --last | Execution flags | Run 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